You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to get kerning advance positions for 'Times New Roman' font from Window 11 fonts. The stbtt_fontinfo seems to be correctly populated and I get proper glyphs and advance/lsb values, but when getting kerning offsets it always results in 0 even though both kern and gpos tables are set. While investigating this I manually disabled gpos table in 'stbtt_GetGlyphKernAdvance' which resulted in getting offset value from kern table which resulted in proper (seemingly correct) offset. From quick debugging session it seems that the code gets stuck in 'stbtt__GetGlyphGPOSInfoAdvance' and never gets past the 'if (lookupType != 2)' check. My test case I used while debugging was to try and get 'stbtt_GetGlyphKernAdvance' value between 'T' and 'e' codepoints with a 'Times new roman' font. The result is 0 (it uses GPOS by default), when forced to use KERN it returns -143. To Reproduce
Init "Times New Roman" font.
Call 'stbtt_GetGlyphKernAdvance' with the initialized font and codepoints of 'T' and 'e'
Result should be 0, if one forces 'kern' and not 'gpos' result should be non-zero.
Expected behavior
Advanace should be non-zero when calling 'stbtt_GetGlyphKernAdvance' with 'Times new roman' and codepoints 'T' and 'e', as the 'e' glyph is slightly pushed into the 'T' glyph bounding box
The text was updated successfully, but these errors were encountered:
Describe the bug
I am trying to get kerning advance positions for 'Times New Roman' font from Window 11 fonts. The stbtt_fontinfo seems to be correctly populated and I get proper glyphs and advance/lsb values, but when getting kerning offsets it always results in 0 even though both kern and gpos tables are set. While investigating this I manually disabled gpos table in 'stbtt_GetGlyphKernAdvance' which resulted in getting offset value from kern table which resulted in proper (seemingly correct) offset. From quick debugging session it seems that the code gets stuck in 'stbtt__GetGlyphGPOSInfoAdvance' and never gets past the 'if (lookupType != 2)' check. My test case I used while debugging was to try and get 'stbtt_GetGlyphKernAdvance' value between 'T' and 'e' codepoints with a 'Times new roman' font. The result is 0 (it uses GPOS by default), when forced to use KERN it returns -143.
To Reproduce
Expected behavior
Advanace should be non-zero when calling 'stbtt_GetGlyphKernAdvance' with 'Times new roman' and codepoints 'T' and 'e', as the 'e' glyph is slightly pushed into the 'T' glyph bounding box
The text was updated successfully, but these errors were encountered: