stb icon indicating copy to clipboard operation
stb copied to clipboard

stb_truetype: Missing glyph lookup wrong when multiple ranges are used with stbtt_PackFontRanges

Open mokafolio opened this issue 1 year ago • 3 comments

Describe the bug

Use stbtt_PackFontRanges with more than one range. If the first range generates the missing glyph bitmap (.notdef) and you use a character in the second range that has no glyph and hence should use the .notdef glyph from the first range, it wont.

Expected behavior Undefined glyphs in the second range should use the proper .notdef glyph.

mokafolio avatar Aug 13 '23 07:08 mokafolio

Will it be helpful to create a small demo to reproduce the issue? If you look at the code in the pull request, the issue should be relatively obvious though.

mokafolio avatar Aug 20 '23 05:08 mokafolio

If you have a repro that always helps, but in general bugs in the stb repository will sit around for something like 9-15 months on average because both Sean and I very rarely have time to work on the stb projects and generally do so in "batch mode" for one weekend every year.

rygorous avatar Aug 20 '23 06:08 rygorous

No rush or worries, I will try to cobble together a small repo soonish!

mokafolio avatar Aug 20 '23 18:08 mokafolio