Skip to content

Commit d89c9a4

Browse files
committed
font-patcher: Add progress indicators
Fixes: #1345 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
1 parent 3e0e0e0 commit d89c9a4

File tree

2 files changed

+445
-1
lines changed

2 files changed

+445
-1
lines changed

font-patcher

+21-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from __future__ import absolute_import, print_function, unicode_literals
77

88
# Change the script version when you edit this script:
9-
script_version = "4.15.0"
9+
script_version = "4.16.0"
1010

1111
version = "3.2.1"
1212
projectName = "Nerd Fonts"
@@ -964,6 +964,16 @@ class font_patcher:
964964
# 0x2592: {'align': 'c', 'valign': 'c', 'stretch': 'xy', 'params': {'dont_copy': box_keep}},
965965
# 0x2593: {'align': 'c', 'valign': 'c', 'stretch': 'xy', 'params': {'dont_copy': box_keep}},
966966
}
967+
SYM_ATTR_PROGRESS = {
968+
'default': {'align': 'c', 'valign': 'c', 'stretch': '^pa1!', 'params': {'overlap': -0.03, 'careful': True}}, # Cirles
969+
# All the squares:
970+
0xee00: {'align': 'r', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'careful': True}},
971+
0xee01: {'align': 'c', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.10, 'careful': True}},
972+
0xee02: {'align': 'l', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'careful': True}},
973+
0xee03: {'align': 'r', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'careful': True}},
974+
0xee04: {'align': 'c', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.10, 'careful': True}},
975+
0xee05: {'align': 'l', 'valign': 'c', 'stretch': '^xy', 'params': {'overlap': 0.05, 'careful': True}},
976+
}
967977
CUSTOM_ATTR = {
968978
# previous custom scaling => do not touch the icons
969979
# 'default': {'align': 'c', 'valign': '', 'stretch': '', 'params': {}}
@@ -1070,6 +1080,15 @@ class font_patcher:
10701080
range(0xf2c2, 0xf2c5 + 1), # move to
10711081
[0xf07b, 0xf0a1, 0xf0d6, 0xf306], # bookmarks
10721082
]}
1083+
PROGR_SCALE_LIST = {'ScaleGroups': [
1084+
range(0xedff, 0xee00 + 1), # boxes... with helper glyph for Y padding
1085+
range(0xedff, 0xee01 + 1), # boxes... with helper glyph for Y padding
1086+
range(0xedff, 0xee02 + 1), # boxes... with helper glyph for Y padding
1087+
range(0xedff, 0xee03 + 1), # boxes... with helper glyph for Y padding
1088+
range(0xedff, 0xee04 + 1), # boxes... with helper glyph for Y padding
1089+
range(0xedff, 0xee05 + 1), # boxes... with helper glyph for Y padding
1090+
range(0xee06, 0xee0b + 1), # circles
1091+
]}
10731092
WEATH_SCALE_LIST = {'ScaleGroups': [
10741093
[0xf03c, 0xf042, 0xf045 ], # degree signs
10751094
[0xf043, 0xf044, 0xf048, 0xf04b, 0xf04c, 0xf04d, 0xf057, 0xf058, 0xf087, 0xf088], # arrows
@@ -1104,6 +1123,7 @@ class font_patcher:
11041123
{'Enabled': True, 'Name': "Seti-UI + Custom", 'Filename': "original-source.otf", 'Exact': False, 'SymStart': 0xE4FA, 'SymEnd': 0xE5FF, 'SrcStart': 0xE5FA, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT},
11051124
{'Enabled': True, 'Name': "Heavy Angle Brackets", 'Filename': "extraglyphs.sfd", 'Exact': True, 'SymStart': 0x276C, 'SymEnd': 0x2771, 'SrcStart': None, 'ScaleRules': HEAVY_SCALE_LIST, 'Attributes': SYM_ATTR_HEAVYBRACKETS},
11061125
{'Enabled': box_enabled, 'Name': "Box Drawing", 'Filename': "extraglyphs.sfd", 'Exact': True, 'SymStart': 0x2500, 'SymEnd': 0x259F, 'SrcStart': None, 'ScaleRules': BOX_SCALE_LIST, 'Attributes': SYM_ATTR_BOX},
1126+
{'Enabled': True, 'Name': "Progress Indicators", 'Filename': "extraglyphs2.sfd", 'Exact': True, 'SymStart': 0xEE00, 'SymEnd': 0xEE0B, 'SrcStart': None, 'ScaleRules': PROGR_SCALE_LIST, 'Attributes': SYM_ATTR_PROGRESS},
11071127
{'Enabled': True, 'Name': "Devicons", 'Filename': "devicons/devicons.ttf", 'Exact': False, 'SymStart': 0xE600, 'SymEnd': 0xE7E3, 'SrcStart': 0xE700, 'ScaleRules': DEVI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT},
11081128
{'Enabled': self.args.powerline, 'Name': "Powerline Symbols", 'Filename': "powerline-symbols/PowerlineSymbols.otf", 'Exact': True, 'SymStart': 0xE0A0, 'SymEnd': 0xE0A2, 'SrcStart': None, 'ScaleRules': None, 'Attributes': SYM_ATTR_POWERLINE},
11091129
{'Enabled': self.args.powerline, 'Name': "Powerline Symbols", 'Filename': "powerline-symbols/PowerlineSymbols.otf", 'Exact': True, 'SymStart': 0xE0B0, 'SymEnd': 0xE0B3, 'SrcStart': None, 'ScaleRules': None, 'Attributes': SYM_ATTR_POWERLINE},

0 commit comments

Comments
 (0)