Freetype fixes - #1240
Open
kierank wants to merge 3 commits into
Open
Conversation
The renderer read the coverage of a glyph at buffer[j * width + i], which is only where it is when the bitmap has no padding between its lines. Both the small bitmap cache and a rendered glyph say what the distance between two lines is, so use it: with a padded bitmap the glyph was sheared by a pixel per line and read past the end of the buffer on the last ones. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The left of the box was taken from the first glyph under "if (!i)", but the string index is advanced before the test, so it was never zero and the box always started at zero however far into the line the first glyph sat. Take it from the first glyph that is actually looked up. The height was assigned twice, the second time without the guard the first one had, which made the guard do nothing; drop the second one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The scaler handed to the cache manager is a stack structure with two fields left unset; the manager keeps a copy of it. They are the resolutions, which it only reads when the sizes are not in pixels, so nothing came of it, but zero them rather than hash and store whatever was on the stack. FT_Get_Advance leaves its output untouched when it fails, and the result was added to the total either way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Someone with more freetype knowledge should check these. Claude was insistent they were bugs.