mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 22:39:07 +00:00
Type: Show Similar Fonts lists a family with no numbers in common after the measured ones
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.
This commit is contained in:
@@ -58,7 +58,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Show Similar Fonts",
|
||||
[],
|
||||
None,
|
||||
"{family (any of its names), limit?: whole number 1..100000 (default: all)} → {family: the family's own name, families: [names]}: the families `text.fontList` lists, ordered as a font menu's Show Similar Fonts orders them: the family itself first, then those that set the same script (Japanese, Thai or neither), then the others, each group nearest first by VectorCraft's own measure of the faces nearest an upright Regular (OS/2 PANOSE digits, weight and width classes, x-height, cap height and average character width, the italic angle, and the kind); an error when the family isn't available or the font menus don't list it, or `limit` is not a whole number from 1 to 100000",
|
||||
"{family (any of its names), limit?: whole number 1..100000 (default: all)} → {family: the family's own name, families: [names]}: the families `text.fontList` lists, ordered as a font menu's Show Similar Fonts orders them: the family itself first, then those that set the same script (Japanese, Thai or neither), then the others, each group nearest first by VectorCraft's own measure of the faces nearest an upright Regular (OS/2 PANOSE digits, weight and width classes, x-height, cap height and average character width, the italic angle, and the kind; a family that shares none of these numbers with it comes after those that share one); an error when the family isn't available or the font menus don't list it, or `limit` is not a whole number from 1 to 100000",
|
||||
always,
|
||||
similar_fonts
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user