mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 18:27:02 -06:00
Part of #394: Highlight Alternate Glyphs defaults to off.
This commit is contained in:
committed by
bflatastic
parent
8689863fbf
commit
0ffe0c7c0e
@@ -1007,7 +1007,7 @@ impl Default for Prefs {
|
||||
font_preview_size: s("medium"),
|
||||
recent_fonts_count: 10,
|
||||
missing_glyph_protection: true,
|
||||
highlight_alternate_glyphs: true,
|
||||
highlight_alternate_glyphs: false,
|
||||
placeholder_text: true,
|
||||
units_general: s("points"),
|
||||
units_stroke: s("points"),
|
||||
|
||||
@@ -1286,6 +1286,18 @@ fn show_font_names_in_english_preference_is_stored() {
|
||||
assert!(s.prefs.font_names_in_english);
|
||||
}
|
||||
|
||||
/// Preferences › Type › Highlight Alternate Glyphs (#394): off by default so OpenType
|
||||
/// substitutions are not pink on every canvas until the user turns the preference on.
|
||||
#[test]
|
||||
fn highlight_alternate_glyphs_preference_is_off_by_default() {
|
||||
let mut s = Session::new();
|
||||
assert!(!s.prefs.highlight_alternate_glyphs, "off by default");
|
||||
set_pref(&mut s, "highlightAlternateGlyphs", json!(true));
|
||||
assert!(s.prefs.highlight_alternate_glyphs);
|
||||
set_pref(&mut s, "highlightAlternateGlyphs", json!(false));
|
||||
assert!(!s.prefs.highlight_alternate_glyphs);
|
||||
}
|
||||
|
||||
/// Preferences › Hyphenation › Exceptions (#394): `prefs.set` pushes the list into the hyphenator
|
||||
/// and bumps open documents so type reflows. Parsing of the list is covered in `vectorcraft-text`.
|
||||
#[test]
|
||||
|
||||
@@ -1072,6 +1072,21 @@ fn show_font_names_in_english_does_not_change_font_list_for_agents() {
|
||||
assert!(families.iter().any(|f| f.as_str() == Some("Source Sans 3")), "{families:?}");
|
||||
}
|
||||
|
||||
/// Preferences › Type › Highlight Alternate Glyphs (#394): off by default so the canvas stays
|
||||
/// clear until an agent (or the Preferences dialog) turns it on. Headless MCP has no canvas.
|
||||
#[test]
|
||||
fn highlight_alternate_glyphs_pref_round_trips_for_agents() {
|
||||
let mut s = server();
|
||||
let r = call(&mut s, 1, "run_command", json!({"command": "prefs.get", "params": {"key": "highlightAlternateGlyphs"}}));
|
||||
assert_eq!(r["isError"], false, "{r}");
|
||||
assert_eq!(serde_json::from_str::<Value>(&text_of(&r)).unwrap(), json!(false));
|
||||
let r = call(&mut s, 2, "run_command", json!({"command": "prefs.set", "params": {"key": "highlightAlternateGlyphs", "value": true}}));
|
||||
assert_eq!(r["isError"], false, "{r}");
|
||||
let r = call(&mut s, 3, "run_command", json!({"command": "prefs.get", "params": {"key": "highlightAlternateGlyphs"}}));
|
||||
assert_eq!(r["isError"], false, "{r}");
|
||||
assert_eq!(serde_json::from_str::<Value>(&text_of(&r)).unwrap(), json!(true));
|
||||
}
|
||||
|
||||
/// Type preferences reach agents (#394): type the Type tool places starts with placeholder text,
|
||||
/// selected; Alt+→ tracks it by Tracking and Cmd+Shift+. steps its size by Size/Leading.
|
||||
#[test]
|
||||
|
||||
+5
-1
@@ -1976,7 +1976,7 @@ control channel's `ui.drag` scrubs), `showHomeScreen` (on by default: the Home s
|
||||
off, an empty window, and the Home button or `app.home` still shows the screen), `autoCollapseIconPanels` (off by
|
||||
default: on, a click away from a panel popped out of the icon column puts it away), `displayPrintSize` (off by
|
||||
default: View › Actual Size / `view.actualSize` is one document point per screen point; on, one document inch fills
|
||||
96 screen points, an inch at the system's reference density whatever the display scaling). `highlightAlternateGlyphs` (on by default: the canvas paints a pink cell behind glyphs OpenType features
|
||||
96 screen points, an inch at the system's reference density whatever the display scaling). `highlightAlternateGlyphs` (off by default: on, the canvas paints a pink cell behind glyphs OpenType features
|
||||
substituted — ligatures, contextual forms — on screen; Document Setup's Highlight Substituted Fonts / Glyphs stay
|
||||
separate). `blackOnScreen`
|
||||
(Appearance of Black › On Screen, `accurate` by default) sets how the canvas shows pure CMYK black, black ink alone
|
||||
@@ -2088,11 +2088,15 @@ Pen's second anchor at (150, 431), in line with the square's centre.
|
||||
- `hyphenationExceptions` (empty by default): Preferences › Hyphenation › Exceptions. A comma-separated list of words,
|
||||
matched without regard to case: a word with no hyphens is never hyphenated (`typography`), and a word with hyphens
|
||||
breaks only where they are (`hap-pen`). `prefs.set` pushes the list into the hyphenator and reflows open documents.
|
||||
- `highlightAlternateGlyphs` (off by default): Preferences › Type › Highlight Alternate Glyphs. On, the canvas paints
|
||||
pink behind OpenType substitutions (ligatures, contextual forms). Document Setup's Highlight Substituted Fonts /
|
||||
Glyphs stay separate. Agents set it with `prefs.set`; the desktop canvas reads it on the next paint.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"prefs.set","params":{"values":{"typeSizeIncrement":4,"trackingIncrement":50}}}}
|
||||
{"name":"run_command","arguments":{"command":"prefs.set","params":{"key":"fontNamesInEnglish","value":false}}}
|
||||
{"name":"run_command","arguments":{"command":"prefs.set","params":{"key":"hyphenationExceptions","value":"typography, hap-pen"}}}
|
||||
{"name":"run_command","arguments":{"command":"prefs.set","params":{"key":"highlightAlternateGlyphs","value":true}}}
|
||||
{"name":"run_command","arguments":{"command":"type.step","params":{"attribute":"tracking","by":-2}}}
|
||||
```
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -25,7 +25,7 @@ against Illustrator's public documentation; **estimated** unless noted.
|
||||
| Character and Paragraph panels, styles with overrides | done | Character-style Auto-leading resets, partial definitions, local leading overrides, override markers, Undo/Redo and native serialization have regression coverage; differing paragraph alignments leave the shared alignment buttons unselected (headless regressions, full integration CI and visual review pass); mixed-value display for other paragraph fields remains missing |
|
||||
| Character size and horizontal scale after object/group scaling | done | #1034: fields and setters compensate the stored affine; point size follows the transformed em-height axis, not the glyph ink bounds. Range edits, keyboard increments, leading and baseline shift use document points; rotation, reflection and shear remain editable. |
|
||||
| Preserve font sizes while scaling a group | missing | Separate enhancement; scaling still scales text with the other artwork. |
|
||||
| OpenType panel, Glyphs panel, alternates | done | Highlight Alternate Glyphs preference (#394) paints pink behind OpenType substitutions on screen; stylistic sets ss01–ss20, stylistic and titling alternates, proportional and lining figures, superscript and subscript are character-style features (`text.setStyle {features}`, #1607) |
|
||||
| OpenType panel, Glyphs panel, alternates | done | Highlight Alternate Glyphs preference (#394, off by default) paints pink behind OpenType substitutions on screen when on; stylistic sets ss01–ss20, stylistic and titling alternates, proportional and lining figures, superscript and subscript are character-style features (`text.setStyle {features}`, #1607) |
|
||||
| Font menu: samples, live preview, filters, favourites; font matching by any name; Find Font | done | #339; script filter: Japanese, Latin, Thai; the font scan on Linux also reads the folders fontconfig's configuration lists, such as TeX fonts under `/usr/share/texmf/fonts` (#1548, fixes #1529; not verified on Linux) |
|
||||
| Missing glyphs set in an installed font made for their script (Thai, Lao, Khmer, Myanmar first; then any font that has them) | done | Thai: Leelawadee UI, Tahoma, Thonburi, Sukhumvit Set, Noto Sans Thai, TLWG |
|
||||
| Full font-name matching (OpenType name ID 4) | done | #1258: loaded/cataloged faces and Missing Fonts searches; localized names and variable default faces; Windows font-service QA pending |
|
||||
|
||||
Reference in New Issue
Block a user