mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-31 21:27:00 -06:00
Type (#432): new type in a Japanese interface starts top-to-top with em box centre alignment
As decided in #432 (option 2): while the interface is in Japanese, new type starts with em box top-to-top leading and em box centre character alignment; other languages keep the Roman baseline, so Latin area type doesn't move. - The UI tells the engine the language it is drawn in each frame (`Session::ui_language`); without a UI, an explicit `interfaceLanguage` preference counts (`Session::japanese_interface`). - `text.create` and `text.createInPath` (the Type tools' clicks and drags) apply it, and take `leadingModel` / `charAlign` to choose; the values used are journaled, so a replay does the same in any language. - `paraStyle.new` / `charStyle.new` made from nothing (no `attrs`, no text selected) carry them. - Imported text (PDF, SVG, DXF…) keeps the Roman baseline. Saved documents keep what they say. - docs/mcp.md (New type in a Japanese interface) and the ROADMAP note it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
99a5318fe4
commit
fba610284c
+13
@@ -2161,6 +2161,19 @@ undo step.
|
||||
{"name":"run_command","arguments":{"command":"text.setFormat","params":{"burasagari":"forced"}}}
|
||||
```
|
||||
|
||||
## New type in a Japanese interface
|
||||
|
||||
While the interface is in Japanese (VectorCraft › Language, or `auto` on a Japanese system), new type starts with em
|
||||
box top-to-top leading (`leadingModel: "emBoxTop"`) and em box centre character alignment (`charAlign: "emBoxCenter"`);
|
||||
in other languages it starts on the Roman baseline (#432). This covers the Type tools,
|
||||
`text.create` and `text.createInPath`, which also take `leadingModel` and `charAlign` to choose, and `paraStyle.new` /
|
||||
`charStyle.new` made with no `attrs` and no text selected. The values used are kept in the journal, so a replay sets the
|
||||
same in any language. Saved documents keep what they say, and imported text (PDF, SVG, DXF…) keeps the Roman baseline.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"text.create","params":{"x":40,"y":60,"text":"雅楽","leadingModel":"emBoxTop","charAlign":"emBoxCenter"}}}
|
||||
```
|
||||
|
||||
## Moving and flipping type on a path
|
||||
|
||||
Type on a path flows between a start and an end bracket, stored as fractions of its path's length.
|
||||
|
||||
Reference in New Issue
Block a user