Commit Graph
9 Commits
Author SHA1 Message Date
BFlat facb326b16 Merge pull request #8377 from dotCooCoo/perf/inline-refresh-changed-subtrees
Type: inline graphics are checked again only in the layer trees an edit changed
2026-11-18 12:57:22 +07:00
BFlat 7e6a42abef Merge pull request #7543 from dotCooCoo/fix/dialogs-keep-preview-warning
Type: typing kept when a dialog or a panel previews keeps its warning and selection
2026-11-18 10:11:54 +07:00
dotCooCoo 24e0208d31 Type: inline graphics are checked again only in the layer trees an edit changed
After an edit of a document with symbols, the refresh of inline graphics
walked every node of every layer. It now keeps the document the last
refresh left resolved, with the symbol bounds it measured, and checks
only the layer trees that are not the same nodes as that document's,
as long as the symbols, graph designs, pattern tiles and foreign data
(which holds the symbols' natural sizes and 9-slice guides) are the
same and each measured symbol still measures the same. Otherwise the
full pass runs, as before. Visit order is unchanged, so the document
and the ids of the texts laid out again equal the full pass's.
2026-11-17 10:08:24 -08:00
dotCooCoo 75b02ea8df Symbols: the panel reads the current symbol without running symbol.list
The Symbols panel and its panel menu asked for the current symbol on
every frame by running symbol.list, which builds a row per symbol and
walks the whole document once per symbol to count its instances. They
now read it from the active document with cmd::current_symbol, the
rule symbol.list itself uses for its `current`: the stored name while
a symbol has it, else the first symbol. symbol.sortByName,
symbol.place, symbol.options and text.insertInline use the same
function, and symbol.list's reply is unchanged.

An idle frame of the panel or its menu now runs no command, so on
macOS the native menu is not brought up to date on every frame while
the panel is open. In a document with 200 symbols and 50,000 objects
the read takes 0.035 us instead of 48.5 ms in a release build (thread
CPU time on Linux, median of 7 runs). The gain matters on large
documents; on small ones it is too small to notice.
2026-11-16 05:29:31 -08:00
dotCooCoo 74dd0fc9fe Type: typing kept when a dialog or a panel previews keeps its warning and selection
With Performance > Real-time Drawing and Editing off, the Type tool's
typing waits to be applied until its session ends. Dialogs and panels
that start a preview now begin it through a path that keeps the typing
as its own undo step and shows the warning of the typing's preview in
the status bar. When the typing cannot be kept, the effect dialogs'
Preview, the Color Picker, Swatch Options and the font menus' preview
show the error in the status bar and do not preview.

- The font menus, the Effect Gallery, a paint for the characters the
  Type tool selected and an inline graphic inserted while typing apply
  the deferred typing first instead of dropping it.
- The Character, Paragraph and Tabs panels, Bullets and Numbering,
  Justification and the inline graphic read the Type tool's selection
  in the typed text, after the typing is applied.
- A live panel slider shows an error from ending its preview.
2026-11-14 02:53:22 -08:00
dotCooCoo 19be0bb880 Type: inline graphics in symbol, mask and pattern art follow their symbols
Type with an inline graphic was resolved only in the layers, so type in
the art of another symbol, a graph design, a pattern tile or an opacity
mask kept the size its graphic had when it was made. The symbol holding
that type, its instances and the inline graphics that show it were
measured from the stale layout.

- Inline graphics are resolved in every tree that holds type. Symbols
  are resolved in dependency order, so a symbol's type is laid out
  before the type that shows that symbol inline. Edits, opening,
  reverting and Refresh Font List use the same pass.
- The pass visits each object once: it resolves the children first and
  copies a node only when something below it changed. It measures each
  symbol's art once per pass.
- An inline graphic of a symbol whose art shows that symbol inline,
  directly or through other symbols, is an empty slot. The symbols on
  such a cycle are found once and cached until the symbols change.
- A changed inline graphic also clears the text's cached baselines.
2026-11-13 10:17:33 -08:00
Dylan M. Taylor 0b821b3c54 Extract engine command and state helpers 2026-10-28 16:44:14 +00:00
bflatastic 14f804cdee Type: ruby (ふりがな) for live text
Squashed from #3448 onto main.
2026-10-22 00:10:56 +07:00
haven b843fe8af3 M7: inline symbols in text
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.
2026-10-08 15:45:34 -07:00