Assert occurs when imgui_freetype is used.#5829
Assert occurs when imgui_freetype is used.#5829nkari82 wants to merge 2 commits intoocornut:masterfrom nkari82:master
Conversation
…annot create image data.
|
Hello, Thanks for the PR but we cannot merge code without understanding a problem. |
|
Some fonts crash with pack_rect.was_packed set to 0. Instead, in the case of pack_rect.was_packed 0, we fixed this problem by adding only advanceX of the glyph data without image data. |
Please be specific and provide fonts/size/ranges information. |
NanumSquareB/18/GlyphRangesKorean Same information. |
… prevent large amount of glyphs from being packed correctly. (#5788, #5829) This seemingly innocuous change sursingly had very large side-effects of completly breaking packing for the test font mentioned in above issue. Not even sure why tbh. New code matches what stb_truetype's stbtt_PackBegin() does.
|
Hello, --stbrp_init_target(&pack_context, atlas->TexWidth, TEX_HEIGHT_MAX, pack_nodes.Data, pack_nodes.Size);
++stbrp_init_target(&pack_context, atlas->TexWidth - atlas->TexGlyphPadding, TEX_HEIGHT_MAX - atlas->TexGlyphPadding, pack_nodes.Data, pack_nodes.Size); |
… prevent large amount of glyphs from being packed correctly. (#5788, #5829) This seemingly innocuous change sursingly had very large side-effects of completly breaking packing for the test font mentioned in above issue. Not even sure why tbh. New code matches what stb_truetype's stbtt_PackBegin() does.
… prevent large amount of glyphs from being packed correctly. (ocornut#5788, ocornut#5829) This seemingly innocuous change sursingly had very large side-effects of completly breaking packing for the test font mentioned in above issue. Not even sure why tbh. New code matches what stb_truetype's stbtt_PackBegin() does.
Skip with spacebar (codepoint 32) or only advanceX for glyphs that cannot create image data.