forked from 1b-agent/opencadstudio-upstream
When a Text/MText entity's anno-scaled glyph height projects to fewer than 4 screen pixels, drop the per-glyph stroke tessellation and emit a single filled rectangle in the text's color instead. The user still sees "text lives here" at the original color and footprint, but the expensive font-stroke generation is skipped for thousands of unreadable labels at fit-all / zoom-out views. Pre-boosts the fill color to compensate for the 0.45 ambient-occlusion dim the face3d pipeline applies (it's meant for 3D-shaded mesh solids, not 2D text greeking). Note: applies only to top-level entities; Text/MText *inside* block defs is already tessellated into the block cache at build time, so greeking those would require either a cache rebuild on zoom or a parallel "low-detail" cache. Left for later if real-world test suggests it's needed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>