Repository navigation
Conversation
…anvas With a Type tool and exactly one character selected, the canvas shows up to five of that character's alternate glyphs in a row beside it. A click runs the command the Glyphs panel's double-click runs, as one undo step; an arrow at the end opens the Glyphs panel on Alternates for Current Selection when the character has more. Preferences > Type > Show Character Alternates (showCharacterAlternates, on by default) turns the row off.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
With a Type tool and exactly one character selected, the canvas now shows that character's alternate glyphs in a row beside it. A click on a glyph replaces the character's glyph, as Replace characters with alternate glyphs describes under "Replace a character with on-canvas alternate glyphs". The row shows at most five alternates, and an arrow at its end opens the Glyphs panel on Alternates for Current Selection when the character has more, as the reference manual describes.
text.setRangeStyle {featureChanges}, ortext.setGlyphAlternatefor a glyph no feature draws there), as one undo step. A letter of a joined Arabic word keeps the word joined.These rules are VectorCraft's own:
showCharacterAlternates, on by default) turns the row off.prefs.setrefuses a value that is not a boolean.The row has no command of its own: an agent reads the alternates with
text.glyphAlternatesand applies one with the commands above.docs/mcp.mdand the progress doc describe the row and the preference. The two new tooltips and the preference label have rows in every catalog.How it was tested
New tests:
canvas::alternates_bar::tests(5 tests): no row for a caret, two characters, a character without alternates, another tool or the preference turned off; five of six alternates plus the arrow; a click replaces the glyph as one undo step and keeps the text; the default glyph comes first after a pick; the arrow opens the Glyphs panel on Alternates for Current Selection without changing the document; a medial Arabic letter gets its medial alternates and its neighbors keep their joining forms; vertical type puts the row on the right; placement next to the canvas edge and the task bar.prefs_dialog::tests::show_character_alternates_is_a_saved_type_preferenceandtests::prefs::show_character_alternates_preference_is_on_by_default_and_saved.The four canvas tests that need the row fail when the row is turned off in the code.
Commands run on
7ff186bd31(base676f0524cc; it merges cleanly withmainat67f6d3a50f):cargo fmt --all -- --checkcargo check --workspace --testscargo clippy -p vectorcraft-engine -p vectorcraft-ui-egui --all-targets -- -D warningscargo test -p vectorcraft-ui-egui --lib -- canvas::alternates_bar prefs_dialog::tests::show_character_alternates i18n panels::glyphs: 148 passedcargo test -p vectorcraft-engine --lib -- tests::prefs: 119 passedcargo xtask brands,layers,assets,wasmChecklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md.