Window › Retype shows a panel that lists the fonts whose glyphs the
selected outlined text exactly matches. Find Matching Fonts lists ten,
ranked by how many shapes each matches and then by how closely, and
Find more font matches adds the next five from the same search. Each
row shows a sample in the font, at the size the panel menu sets (Small,
Medium, Large) and with the text typed in the panel. A click on a row
sets the font on the selected live type. Reset Retype Panel clears the
list.
- type.retypeFonts {count?} returns the ranked fonts without changing
the document. It compares shapes with the glyphs of up to 96 loaded
fonts, those of the document's live type first, by type.retype's
matching. A shape counts once for each font it fits. Of two loaded
versions of a font, only the version its name gives is compared.
- RetypeIndex::all_matches returns every fit of a shape, so fonts past
the first 16 fits are ranked too.
- retype.find, retype.list, retype.preview and retype.reset drive the
panel.
- Rows for the panel's labels and the commands' errors in every
complete catalog. The Retype row also translates the Type › Retype
menu item.
Docs: docs/mcp.md (Retype panel), docs/target-app-parity.md,
docs/ui-parity.md, docs/gaps.md, docs/type-parity.md.
Part of #4934. Builds on #8441.
The Pressure Sensitive test now requires finite anchors and a positive,
finite width at both light and heavy pressure before it compares them.
The current brush-library inventories in docs/target-app-parity.md,
docs/gaps.md, docs/roadmap.md and docs/ui-parity.md list Pressure
Sensitive and count eleven built-in libraries.
The writer passed no language to craft-pdf, so exported and printed
PDFs had no /Lang and accessibility checkers failed primary-language.
Writer::new now passes the BCP 47 tag of the Document Setup language
(new vectorcraft_doc::setup::language_tag, en-US by default) through
write::Writer::new_with_language, which writes the catalog's /Lang and
the XMP dc:language. A language with no tag writes none. /MarkInfo is
left for tagged PDF (#3643).
type.retype turns selected outlined text back into live point text when
each glyph shape is exactly a glyph of a loaded font, a font the document
uses or a family named in fonts: the same up to uniform scale, rotation
and translation. Matched glyphs map back to characters through the cmap
and become point text in that font and size at the same baseline and
turn, one object per line, with the first glyph's fill and stroke, in one
undo step. Shapes that match no font stay and are reported.
Matching (vectorcraft_text::retype) samples each contour at equal steps of
arc length and fits a similarity transform; it is bounded (faces, glyphs,
path elements, contours) and panic-free. Near matches, the ranked font
list, installed fonts not yet loaded and images are phase 2.