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

Fix a rendering bug for text on path using very large font. #468

Merged
merged 1 commit into from May 23, 2019
Merged

Fix a rendering bug for text on path using very large font. #468

merged 1 commit into from May 23, 2019

Conversation

francois-dorin
Copy link
Contributor

Text on path using a large font (like 300px) can break the text rendering (example in the image below where the expected result is the right text)
breaked text

This issue comes from the rendering process which calculates the position of each character in a fixed-size box. With a large font, the right bound of the box can be reach and a new line inserted.

So the fix is quite simple: using a dynamicaly width for the box, based on the number of characters to render and the height of the font.

The pull request comes with a fix, and svg & png images for the test suite.

Copy link
Member

@mrbean-bremen mrbean-bremen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks good!

@mrbean-bremen mrbean-bremen merged commit 8c44d8b into svg-net:master May 23, 2019
@francois-dorin francois-dorin deleted the fix-large-font branch May 23, 2019 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants