Repository navigation
M7: inline symbols in text - #627
Merged
bflatastic merged 1 commit intoOct 8, 2026
Merged
Conversation
Document symbols placed inline in a run of type (beyond Illustrator; like InDesign inline anchored objects): TextRun.inline holds the symbol, scale and shift; the run is one U+FFFC laid out as a glyph sized to the art, centred on the cap height. text.insertInline and Type > Insert Inline Symbol; editing keeps the graphic whole; canvas, SVG (<use>) and PDF draw the art; Create Outlines turns it into a symbol instance.
Member
|
Merged via #630, thanks @Haven-King! Inline symbols are a neat addition for instructions, legends and UI docs. Having them flow, wrap and reorder like a glyph, follow symbol edits, and export to SVG and PDF makes them first-class. I inserted a dot symbol into a line with |
This was referenced Oct 8, 2026
NoobsDeSroobs
pushed a commit
to NoobsDeSroobs/vectorcraft
that referenced
this pull request
Oct 8, 2026
…inline field storytold#627 added TextRun::inline while storytold#631 was open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Some type needs small pieces of art inside a line, such as icons in instructions, UI glyphs in documentation, or symbols in game and map legends. VectorCraft could only fake this with symbol-font glyphs and separately positioned objects.
TextRun.inline: Option<InlineArt>holds the symbol,scaleandbaseline_shift; the run is a single U+FFFC.scale× the font size and centred on the cap height.TextLayout.inlinesrecords each placement.<use>for each graphic.symbol.listinstance counts and Select All Instances ignore inline uses.How it was tested
crates/text/src/tests_inline.rs:crates/engine/src/tests_inline.rs: the command; junk parameters; Type tool with Backspace and undo; Redefine/Delete Symbol; save/open; Create Outlines.crates/engine/tests/inline_text.rs: canvas pixels and opacity; SVG and PDF export that re-import and render.command_sweepjunk cases; native round trip. All symbol art in tests is drawn in code.Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm). All 7 steps pass on b843fe8, every test included.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). Clippy's no-panic lints pass on b843fe8.
ASSETS.md(no new assets).