The font menu's Recently Added chip, on its own row under Font Technology,
lists only the installed families with a font file created in the last 30
days, the newest at the top. It combines with the search, script, kind,
Variable, star and Document filters, lists the recently used families in
the same order without the Recent Fonts section, leaves Show Similar Fonts
to order only these families, steers the closed field's wheel, and is
shared by every font menu for the session.
The font scan keeps each file's creation time, and
FontDb::recently_added(now) dates a family by its newest file at or
before `now`, the 30th day included. Files without a creation time or
dated in the future do not count, and families added at the same instant
are in name order. The open menu lists a family no longer once its 30
days end.
The Glyphs panel asked the face for its characters on every frame, and
each call read the whole cmap, sorted it and removed repeated
characters. A face now keeps the list the first time it is asked for
(FontFace::mapped_chars) and shares it; FontFace::chars returns a copy
of it, in the same order. The panel finds a Unicode subset's characters
by searching the sorted list, and Entire Font uses the face's shared
list of unencoded glyphs instead of copying it each frame. The cells the
panel shows do not change.
Measured in one release process, old read and shared list alternating,
median of 7 samples of 100 calls, wall-clock times from a single run:
- Source Sans 3 Regular, 1,614 characters: 0.0101 ms to 0.000004 ms
- a test font of 50,000 characters: 0.2347 ms to 0.000004 ms
The saving matters for fonts with large character maps, such as CJK
fonts.
FontLikeness::distance left out every number either face does not give,
so a family whose faces give none of them (static faces with no OS/2 or
post table) was 0 from every family, and Show Similar Fonts could list
it right after the chosen family, as an exact match. Faces that share
no number to compare are now f32::INFINITY apart, so such a family
comes after every family of its script group that shares one, and
families equally far keep their order. The order of measured families
does not change. This is VectorCraft's own rule.
Builds on #7983, which added Show Similar Fonts.
Each paragraph of type on a path now sets its glyphs at its Desired word
spacing, letter spacing and glyph scaling, as point and area type do. The
spaced glyphs feed the steps along the path, alignment, the hangs and the
overflow, so text after a wider gap starts further along and a right or
centered line is aligned by its spaced length. Minimum and Maximum are not
used, vertical type is not glyph scaled, and a list marker keeps its width.
This changes existing documents: type on a path whose paragraphs carry
non-default Desired values now spaces differently and can overflow where
it did not.
SVG export writes such type as outlines with a warning, since a
<textPath> places its characters at their own advances.
Docs: docs/mcp.md, docs/type-parity.md, docs/gaps.md,
docs/target-app-parity.md.
optical_kerning_keeps_the_tsume_of_a_letter_with_coloured_harakat also
runs on an installed Arabic face. In macOS's Arial (5.01.2x) the initial
beh and its fatha fill their whole cell, so Tsume rightly takes nothing,
but the test required it to move something. The installed-face check now
measures each cluster's blank space first: with some, Tsume must move the
glyphs; with none, it must move nothing. The test font stays strict.
similar_families looked up each listed family's traits on its own, and
each look scanned every loaded face, so ordering the font menu took time
in the square of the families loaded. It now gathers the loaded faces'
traits in one pass and reads the scan's catalog once, and family_traits
uses the same helpers, so both give the same traits.
A ≈ button on a family's row in the font menus orders the listed families by
how alike they look to it: that family first, then the families that set the
same script (Japanese, Thai or neither), then the others, each group nearest
first. The Recent Fonts section is left out while the list is ordered this
way. A ≈ chip under the filters names the family and clears the order, with
that family still highlighted; closing the menu clears it too.
The measure is VectorCraft's own. Each face records its OS/2 PANOSE digits,
weight and width classes, x-height, cap height and average character width,
and its post italic angle; a named instance of a variable font takes its wght
and slnt settings. The system font scan reads the head table and the post
table's header besides the tables it read before, so installed families are
compared by the same numbers without loading them. A family is compared by its
face nearest an upright Regular, a number either face does not give is left
out, and a family of another kind counts as further away.
text.similarFonts {family, limit?} returns the same order, with errors for a
missing or non-string family, a family that is not available or not listed in
the font menus, and a limit that is not a whole number from 1 to 100000.
The test font mapped ゝ, ゞ, ヽ and ヾ but not U+3099, so the cluster
ゝ U+3099 went to the first fallback face that has both characters.
Built with craft-fonts, that is a Japanese face, which drew the voiced
mark with its own glyph, and
kurikaeshi_moji_shori_draws_a_decomposed_voiced_mark_voiced failed.
The font now maps U+3099, so the cluster is shaped in the test font
with or without craft-fonts.
Show Sample (Hide Sample when it shows) in Type > Composite Fonts... draws
the font picked in a line of sample text, with the first character of
each custom set added, through the renderer, so color and bitmap glyphs
keep their colors. Buttons beside it show or hide lines for the ICF box,
em box, baseline, cap height, highest ascent and lowest descent, highest
ascender and x-height, and Zoom draws it at 25% to 800% of 36 pt. The em
box and ICF box are the Kanji part's font's; the other lines measure the
faces the glyphs are drawn in, fallback faces included. Each line takes
its part's size, baseline and vertical scale, and Kana scaled at center,
as layout sets them.
ui.dialog.set takes sample, zoom and the seven line fields, and refuses a
zoom outside the menu or a line that is not true or false. FontFace gains
cap_height(), the estimate a face without an OS/2 cap height uses, beside
x_height().
Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
After Alternates for Current Selection, the Glyphs panel's Show menu
and panel menu list the categories the browsed font's GSUB features
give glyphs to: Ligatures, Swash, Stylistic Alternates, each stylistic
set by the font's name for it (else Set N), Small Caps, Ornaments,
Fractions and Figures. Choosing one shows that category's glyphs, the
characters first and then the glyphs no character maps. A font without
the chosen category shows Entire Font.
- text: FontFace::glyph_categories reads the single, alternate,
multiple and ligature substitutions of each category's features,
once per face, leaving out a substitution an earlier subtable of
its lookup shadows, within a total glyph budget.
- engine: text.glyphCategories {family, style?} lists them.
- ui-egui: the Show menu and panel menu entries, with Ligatures,
Ornaments and Figures rows in every catalog.
Docs: docs/mcp.md, docs/target-app-parity.md.
Tsume no longer stops at horizontal type. In vertical type an upright
character loses its share of the blank space above and below its ink,
inside its cell down the column (the font's vertical metrics, else at
least one em, with the Proportional Metrics change), in point type and
on a path. A character lying on its side is measured along its own
width, and the characters of a tate-chu-yoko block close up across the
column while the block keeps its one em.
Tsume now measures what a glyph paints: its COLR or SVG art, else its
color bitmap, else its outline, so a color glyph is no longer measured
by the outline its art replaces.
Docs: docs/mcp.md, docs/target-app-parity.md, text.setRangeStyle and
text.setFormat params.
A Glyphs panel cell whose glyph has alternates shows a small triangle in
its lower right corner. A click on it opens a pop-up of that glyph and
its alternates in the font's order. Picking one inserts the character at
the Type tool's caret drawn with that glyph, or draws the selected
character with it, in one undo step; the cell's own glyph inserts the
character as a double-click does. In Entire Font a glyph no character
maps has the triangle too, and a pick goes on the selected character as
a double-click on that glyph's cell does.
A pick is tried on a copy of the document first, so one the character
cannot be drawn with (All Caps, for example) changes nothing and the
status says why. A Select All over a threaded story is replaced as
typing replaces it. The triangle's size and the pop-up's eight columns
and six rows are VectorCraft's own.
ゝ or ヽ followed by U+3099, which a font draws as one glyph, is now drawn
at a line start as ゞ or ヾ would be, instead of as the plain kana. A mark
that shares its cluster with other glyphs, or with any other combining
character, keeps its own glyphs.
A frame of type on a path whose first paragraph continues from the frame
before now draws a repeat mark at its start as the character before it in
the frames before, as area and point type do. The mark keeps its advance,
so the glyphs stay where they were, and live SVG text writes the character
drawn.
Vertically aligned area type in a frame that is not a rectangle flows its
text again until it settles, and each pass added the line-start repeat
marks to the layout's records once more, so SVG export could look up the
wrong character. Each pass now starts from empty records, and an undone
pass restores the ones before it.
Each line that started with a repeat mark scanned the paragraph's text from
its start for the character the mark stands for, so a paragraph with marks
at the start of many lines took quadratic time to lay out. The scan now
goes on from the line before.
Paragraph panel menu > Kurikaeshi Moji Shori (text.setFormat
{kurikaeshiMojiShori}) is a paragraph attribute, off by default, saved
only when on and carried by paragraph styles. On, a repeat mark (々, ゝ,
ゞ, ヽ, ヾ) that starts a line of point or area type is drawn as the
character it repeats, with the mark's width, and the text keeps the
mark. Threaded type looks back into the frames before when a paragraph
continues. Live SVG text writes the drawn character and places the
text after it.
The Character panel shows Adjust Horizontal and Adjust Vertical Diacritic
Position with the Middle Eastern options. text.setFormat and
text.setRangeStyle take diacriticHorizontal and diacriticVertical, in
thousandths of an em from -1000 to 1000. Positive values move the
characters' mark glyphs (GDEF class 3) right and up, and the letters keep
their places. An Arabic harakat or a Hebrew point styled apart from its
letter takes its own values without splitting the shaping cluster.
Character styles and Character Style Options carry both values. They are
saved only when set, and SVG export writes such type as outlines.
Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
Type > Composite Fonts... has Custom: named character sets, each setting
the characters it lists in its own font, style, size, baseline and
scales ahead of their class. The later of two sets that list a character
sets it. Characters are added by Direct Entry or by Unicode code and
deleted one at a time, and the parts table scrolls when it grows.
- type.compositeFonts.set takes `custom`; part keys left out take the
Kanji part's values. Sets are saved with the document and in
.vccomposite files, and Export refuses a file over 4 MB.
- VectorCraft's own limits: 64 sets per font, 8,192 characters per set,
each character once per set, up to U+FFFF and no control characters.
- The font database caches each font's character lookup.
Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
On a tabbed line measured as drawn, a full stop or comma now hangs when
it is last in the visual order of the line's levels (UAX #9 L2, with
each tab and the spaces before it at the paragraph's level), whatever
its own level. A mark at level 2, or a lone right-to-left mark after
left-to-right text, hangs again; a mark inside a right-to-left run
still ends the line at an earlier break.
A mark that No Break or Bunri-Kinshi keeps with the characters after
it no longer ends the line as if it hung: the line would end with
those characters, which are drawn inside it, so it ends at an earlier
break.
A right-to-left paragraph draws a comma or full stop inside its line,
but the breaker still kept an overflowing mark on the line as if it
hung, so the line was drawn past the frame. The breaker now ends such a
line at a break where it fits with the mark.
In a left-to-right line with right-to-left text and a tab, the breaker
hung an overflowing mark without measuring the line as drawn. It now
hangs the mark only when the mark is drawn at the line's right end and
the line before it fits as drawn; otherwise the line ends at the latest
legal break that fits as drawn.
- A form other than the default, set with text.setRangeStyle or
text.setFormat, takes away the characters' glyph choice, which would
otherwise keep drawing its own glyph. "default" keeps it.
- With a width form (fwid, hwid, twid, qwid), shaping leaves out palt and
turns kern and apkn off, and SVG output writes font-kerning: none and no
palt, as the OpenType feature list asks. proportionalMetrics and kerning
keep their values.
- The Glyphs panel menu counts a width form as available when a face has
the feature in GSUB or GPOS.
- At a caret, the menu's check marks and its no-op check read all the
text of the object, which is what the command formats. Choosing the
current form again is not skipped when a character has a glyph choice.