mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 22:33:08 +00:00
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