Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General support for border width in PDF Tr operator #2571

Closed
wants to merge 5 commits into from

Conversation

JorjMcKie
Copy link
Collaborator

We previously did not support setting border width for writing text with TextWriter class. This fix adds this support.

In some situations, we were computing a wrong character bbox in Page method get_texttrace() in that we falsely assume a text up-down flip.
This is being corrected here.
Guard against incompletely specified clip paths by checking whether any drawing items have been generated.
Ensure  #2556 is fixed properly.
For writing text with a glyph border, render mode Tr > 0 must be used.
Parameter "border_width" controls the thickness of the glyph border.

This fix adds support for "border_width" to TextWriter.
This parameter is interpreted as a float factor to be multiplied with the fontsize. Useful values are in the range of 0.05 (5% of the fontsize, default) or less.
This interpretation is now also consistent with "insert_text()" / "insert_textbox()" of the Page and Shape class.
Adjust documentation for Border_width support.
@jamie-lemon
Copy link
Collaborator

Docs side of things looks all good.

@JorjMcKie JorjMcKie closed this Aug 26, 2023
@JorjMcKie JorjMcKie deleted the Tr-border-width branch August 26, 2023 09:10
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants