forked from 1b-agent/opencadstudio-upstream
Text and dimensions vanished on a text-heavy, multi-font DWG. The global SDF glyph atlas was a fixed 1024² page shared across drawings; once full, pack() returned None and every further (font, char, bold) glyph was silently skipped — so late-baked glyphs (dimension text especially) never rendered. Initialise the atlas at 2048² (covers real multi-font/CJK drawings with no growth, so no stale UVs) and add a grow_height() fallback that doubles height, appends zeroed rows, rescales cached entries' V/solid_uv and marks the texture dirty (up to MAX_ATLAS_PX = 8192) rather than dropping glyphs. Co-Authored-By: Claude Opus 4.8 <[email protected]>