FontFace::win_cell_height adds the MVAR `hcla` and `hcld` deltas to
usWinAscent and usWinDescent at the face's location, so EMF and WMF
type with a positive font height is sized against the instance it is
drawn in. The variable test font gains the two records, and a test
checks that Bold's cell is 200 units taller than Regular's.
The comments and docs/mcp.md also say that characters the mapped face
has no glyph for are drawn from other faces at the same size and
Horizontal Scale.
Follows #7608. EMF and WMF type ignored the font's average character
width, and a positive font height was read as a fixed 0.85 of the cell.
Both changes are to how the importer reads a LOGFONT's size fields.
- When the face gives an average width (OS/2 xAvgCharWidth), a font's
average character width becomes Horizontal Scale: the face's average
width at the type size is stretched or narrowed to the font's width,
also when the size is held at its 5000 pt limit. A negative width is
read as its absolute value, and the width is ignored when the height
is 0.
- A positive height is the character cell. The em is the cell times
unitsPerEm divided by the face's usWinAscent plus usWinDescent (its
ascent plus descent when it has no OS/2 table). Type with a positive
height in existing files changes size.
- A font the system lacks is measured in the face VectorCraft draws it
in.
- FontFace gets win_cell_height and average_char_width.
LOGFONT: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfontw
MS-EMF 2.2.13 LogFont: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-emf/1cd7cb7a-1a7c-48d2-b4a4-c218f9d12100
main's gate fails french_catalog_uses_nonbreaking_prose_punctuation on
the "{pos} of {total}: {name}" row of fr.tsv, added by #8017, which has a
plain space before the colon. The row now uses U+00A0 there.
Open #8053 fixes three other rows that main already has right, so it
does not clear this failure.
The Contextual Task Bar and the Control bar check, each time they are
drawn, whether the selection holds a color that Recolor Artwork can
change. The check walked the whole subtree of each selected object even
after the first color, so with one large group selected, the check read
every paint in the group.
- Node::try_walk visits in walk's order and ends at a ControlFlow::Break.
- swatches::node_has_colors stops at the first color node_colors would
visit; node_colors now runs the same visitor without stopping, so the
two read the same nodes and paints in the same order.
- has_colors in the task bar uses node_has_colors.
The result is the same for every selection. On one group of 100,000
paths, the check takes 16 ns instead of 14.5 ms when the first path is
filled; when only the last path is filled, or none is, it costs about
what the full walk costs.