font-patcher: Modernize and expand Octicons scale table

[why]
The scale glyph is not the biggest glyph; the bell-slash is a little bit
wider than the design cell...

[how]
Switch to modern ScaleGroups. These determine the virtual combined
bounding box of all glyphs in the group and scale them 'as one'.

Also add some more groups.

Also correct wrong code of one small stuff.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-05-03 09:38:52 +02:00 committed by Fini
parent db39f37f8d
commit c8bd6d7b68

View file

@ -982,16 +982,17 @@ class font_patcher:
range(0xf221, 0xf22d + 1), # gender or so
range(0xf255, 0xf25b + 1), # hand symbols
]}
OCTI_SCALE_LIST = {'ScaleGlyph': 0xF0E7, # smily (probably biggest glyph / full design cell)
'GlyphsToScale+': [
(0xf03d, 0xf040), # arrows
0xf044, 0xf05a, 0xf05b, 0xf0aa, # triangles
0xf052, 0xf053, 0x296, 0xf250, # small stuff
0xf019, 0xf030, 0xf04a, 0xf050, 0xf071, 0xf08c, # other arrows
0xf078, 0xf0a2, 0xf0a3, 0xf0a4, # chevrons
0xf0ca, 0xf081, 0xf092, # dash, X, github-text
0xf09c, 0xf09f, 0xf0de, # bells
(0xf2c2, 0xf2c5), # move to
OCTI_SCALE_LIST = {'ScaleGroups': [
[*range(0xf03d, 0xf040 + 1), 0xf019, 0xf030, 0xf04a, 0xf050, 0xf071, 0xf08c ], # arrows
[0xF0E7, # Smily and ...
0xf044, 0xf05a, 0xf05b, 0xf0aa, # triangles
0xf052, 0xf053, 0x296, 0xf2f0, # small stuff
0xf078, 0xf0a2, 0xf0a3, 0xf0a4, # chevrons
0xf0ca, 0xf081, 0xf092, # dash, X, github-text
],
[0xf09c, 0xf09f, 0xf0de], # bells
range(0xf2c2, 0xf2c5 + 1), # move to
[0xf07b, 0xf0a1, 0xf0d6], # bookmarks
]}
WEATH_SCALE_LIST = {'ScaleGroups': [
[0xf03c, 0xf042, 0xf045 ], # degree signs