Commit graph

21 commits

Author SHA1 Message Date
Kevin Boos
a13b8876a5
code editor: support proper Fit size bound with max height value (#1128) 2026-06-22 19:54:30 +02:00
Alex
03a64a9406
fix(code_editor): honour East Asian Wide width in column_count (#1048)
`CharExt::column_count` was hard-coded to return 1 for every char. The
code editor's layouter advances x-position by this value per grapheme
(see `code_editor.rs:1217`), so CJK glyphs — which the text shaper draws
at ~2× the Latin monospace advance — overlap one another. Cursor
placement, selection rectangles, and wrap points suffer the same
off-by-half because they all read from `column_count`.

Match the Unicode East Asian Width property so Wide and Fullwidth
characters (plus common emoji that render at double-width) report 2
columns. Keeps a small literal match table instead of pulling in the
\`unicode-width\` crate, since only broad blocks are needed and perf on
the layout hot path matters.

Ranges covered:
  U+3000..U+30FF   CJK punctuation / Hiragana / Katakana
  U+3400..U+4DBF   CJK Unified Ideographs Extension A
  U+4E00..U+9FFF   CJK Unified Ideographs
  U+AC00..U+D7AF   Hangul Syllables
  U+F900..U+FAFF   CJK Compatibility Ideographs
  U+FF00..U+FF60   Fullwidth forms
  U+FFE0..U+FFE6   Fullwidth sign forms
  U+20000..U+2FFFF CJK Unified Ideographs Extensions B..F
  U+1F300..U+1F9FF Emoticons / symbols / transport / supplemental

Effect: Chinese/Japanese/Korean/emoji in code blocks render with correct
spacing in CodeView (and in any widget that layouts via CodeSession).
Latin-only workflows are unaffected.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 22:00:54 +02:00
Admin
b9287c3888 no drawdepth 2026-03-23 10:23:17 +01:00
Admin
2cff94d01b fix android screencap to studio 2026-03-20 09:03:50 +01:00
Sabin Regmi
7ab7f324b3
Use fallback cell size when glyphs missing (#942)
Replace unwraps when querying the first glyph with safe handling and provide a fallback monospace cell size if no glyph is available (e.g. on wasm while fonts are still loading). Computes a reasonable width/height from the current font_size (width = 0.6 * font_size, height = font_size) so the editor can render on first draw instead of aborting. Keeps existing cell_size and cell_offset_y calculations based on the chosen dimensions.
2026-03-14 12:13:04 +01:00
Admin
bca911513d xr otw 2026-03-12 15:51:30 +01:00
Admin
e23a8b3f26 fix uid 2026-03-09 16:42:43 +01:00
Admin
a7d471a8ad fix ime 2026-03-06 17:24:51 +01:00
Admin
e854539b2a fix warnings 2026-02-16 11:58:51 +01:00
Admin
99e1497ae6 missing 2026-02-13 17:58:58 +01:00
Admin
d2393f4c44 terminal coalesce tweaks 2026-02-13 16:48:40 +01:00
Admin
1ba7b2f7fe First 2.0 2026-02-12 14:52:33 +01:00
Admin
2710bef7a1 widget tree refactor 2026-02-12 07:05:13 +01:00
Admin
aadc68376d unclobber codce editor 2026-02-02 19:04:42 +01:00
Admin
0c48db0969 studio otw 2026-02-02 17:11:03 +01:00
Admin
7880546817 align mathtypes to WGSL 2025-12-02 11:43:12 +01:00
Admin
2176889023 Fused Id and LiveId 2025-10-25 20:53:30 +02:00
Eddy Bruel
f25f843c6f Dead code removal 2025-07-09 15:04:16 +02:00
Eddy Bruël
a5c29db888
Fix text centering (#733) 2025-05-08 13:26:43 +02:00
Eddy Bruel
729b4d3fa0 Various fixes 2025-05-08 11:51:43 +02:00
Eddy Bruel
ff9048cc37 Initial commit 2025-05-06 10:11:37 +02:00