Files
OneCAD-Draft/src/app/view
Hakan SevenandClaude Opus 4.8 4479ba8c29 fix(mtext): correct imported-text size in the editor (#394)
The editor preview mis-sized imported MTEXT badly (tiny, huge, or
collapsed). Two root causes:

- The entity's base height often isn't the visible text height: relative
  `\H…x;` codes compound, so an entity of height 1 whose body is `\H0.2x`
  renders at 0.2. Normalize the preview scale by the DOMINANT rendered run
  height (the mode of glyph-box heights, skipping zero-width caret slots),
  not `height_value()`, so the body lands at a fixed readable size and
  headings keep their proportions. EM_PX = 15.
- The bug that made it "completely wrong" was in the serializer, fixed in
  acadrust 389b31a (\H heights decayed on the parse→serialize→parse the
  editor does via folded_value); bumped here.

Also render multi-column MTEXT with its columns side by side (as the
drawing does) and let the preview scroll horizontally to reach them.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-19 17:16:53 +03:00
..