forked from 1b-agent/opencadstudio-upstream
Two defects in the in-app MTEXT editor, both surfaced once the preview text became visible: 1. Invisible preview text. After the SDF text migration, tessellate emits glyphs as SDF quads on `text_verts` and leaves the polyline `points` empty, but the editor preview draws on a 2D canvas that can't run the SDF shader — so only the selection box showed. Add a `force_text_strokes` parameter to tessellate: when set, TEXT/MTEXT run-groups also emit their glyph outline strokes as points. The preview passes true (real stroke font, aligned with glyph_boxes); every other caller passes false and keeps SDF-only text. 2. Enter did not start a new line. mtext_type inserted a literal newline, but the MTEXT layout only breaks on the `\P` code (a raw 0x0A is a break only to the caret logic). Normalise every literal newline — from Enter or a multi-line paste — to `\P`, so the line breaks and the saved value stays standard. Closes #308 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>