forked from 1b-agent/opencadstudio-upstream
Fill triangles (DIMTFILL backgrounds, MLEADER masks, hatches) carry the entity's draw-order rank, but SDF glyph quads were pushed at neutral 0.0 — any entity in the front half of the draw order had its own background fill painted over its text. gather_text_verts now adds the host wire's wire_draw_depth to each glyph: a text background lands at the same biased depth (glyphs draw after fills and win the LessEqual test), and text respects draw order against other entities' fills too. The #403 glyph-reuse fast path gains a rank-stability gate: adding or removing an entity shifts every sibling's bias (the rank denominator changes), so reuse is only safe across all-Modified edits. Co-Authored-By: Claude Fable 5 <[email protected]>