forked from 1b-agent/opencadstudio-upstream
Root cause: the glyph tessellator advanced the pen by advance*width_factor while the transform already scales the pen position by the width factor, so a backward (negative width factor) run kept its word order and grew on the same side of the anchor instead of mirroring across it. Advance in unscaled glyph units to match text_local_bounds; the transform applies the factor once. On top of that: - The renderer honours the entity's own text-generation flags (DXF 71: bit 2 backward / bit 4 upside-down) XOR the text style's flags, and signs the horizontal anchor by the width factor so Center/Right backward text mirrors about its anchor. - MIRRTEXT on: a MIRROR toggles both group-71 bits so the reflected rotation renders a true glyph mirror (backward-upright for a vertical axis, flipped for a horizontal one). - MIRRTEXT off: the text flips left<->right and lands mirror-symmetric to the source (right-reading) instead of hugging the axis. - The MIRROR preview re-derives text ghosts to match the commit; mirrored() now reflects the double-single residual too. Co-Authored-By: Claude Opus 4.8 <[email protected]>