Closed dulingzhi closed 1 year ago
Thanks for looking into this. Did you test this with various example apps (and ideally also backends/demos)?
Also, could you please also update the source files and version?
source files and version updated. I tried the opengl backends and it works fine. And I'm still trying to compile the example program on windows.
Works fine in all examples
OMG Yes. Thx so much for finding the cause! This has been plaguing me from time to time and I resorted to excluding the affected glyphs. Great to have a proper fix for this.
I think we could land this. Anyone any objections?
🚀
Is it possible to merge this PR? @RobLoach
In stbtt_PackFontRangesGatherRects, it skips packing when glyphs are missing. Resulting in incorrect glyphs when nk_font_bake reading these ranges rects data. Referring to the way IMGUI handles it, we skip the rect data check.
ref #399
load font:![image](https://user-images.githubusercontent.com/4182549/209197539-1e3622d1-b52a-4ccc-ac77-ee8959e66754.png)
before:![image](https://user-images.githubusercontent.com/4182549/209198085-8d924cd8-87a2-46b1-a7d1-5ad4cd3f08bd.png)
after:![image](https://user-images.githubusercontent.com/4182549/209198318-b77e4d50-6313-495d-9745-aa3b03942451.png)