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
Added auto hinting compensation to fix too wide gaps between small glyphs #1746
Conversation
This improves glyph spacing by subtracting glyph position deltas from glyph advance generated by forced autohinting
Apply deltas even if the font has no kerning table
getKerning() now passes the bold flag to getGlyph() function, so already cached glyph can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, except some minor adjustments
Regarding that added function parameter: SFML/include/SFML/Graphics/Font.hpp Line 220 in d2406fc
Shall I update the brief as well? If so, do we need to indicate that when different bold flag is used than already cached the glyph will be loaded? |
If you think the brief could need an update/change, then certainly.
Does the user of the function need to care about this implementation detail? |
Would you like me to commit that whiteSpaceWidth compensation as well? |
Since it's a different issue, let's address it in another PR. |
Half of the CI tasks did not start. Do they have to be triggered manually? |
Our own CI setup only executes on demand on third-party PRs for security reasons. @LaurentGomila any additional comment for the PR? |
Description
Forced Autohint requires left and right bearings to be taken into acccount during kerning calculation. Without this the gaps between small glyph sizes are twice as wide on a lot of fonts.
This PR is related to the issue #1642 (comment)
Tasks