mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
FontAwesome: Swap some icons
youtube and cloudsmith should change their codepoints, because youtube occupies a 'lesser' youtube codepoint and yields a 'better' codepoint to cloudsmith. Better means the icon looks more like in FA 4. Also swap the devices icons that in 4 showed a screen and now it is filled. [how] The mechanics is a bit ... ugly. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
e4ad9ee693
commit
c2be39d2a9
1 changed files with 19 additions and 1 deletions
|
@ -21,6 +21,16 @@
|
||||||
import fontforge, os, sys
|
import fontforge, os, sys
|
||||||
|
|
||||||
def find_destination(codepoint, font):
|
def find_destination(codepoint, font):
|
||||||
|
global swap_codes
|
||||||
|
for change in swap_codes:
|
||||||
|
if codepoint not in change:
|
||||||
|
continue
|
||||||
|
if codepoint == change[0]:
|
||||||
|
codepoint = change[1]
|
||||||
|
else:
|
||||||
|
codepoint = change[0]
|
||||||
|
break
|
||||||
|
|
||||||
if codepoint >= 0xF000 and codepoint < 0xF300:
|
if codepoint >= 0xF000 and codepoint < 0xF300:
|
||||||
# Keep codepoints in legacy region 'Region A'
|
# Keep codepoints in legacy region 'Region A'
|
||||||
return codepoint
|
return codepoint
|
||||||
|
@ -125,6 +135,9 @@ prefer_solid = {
|
||||||
0xF2B6, 0xF2B9, 0xF2BB, 0xF2BD, 0xF2C2,
|
0xF2B6, 0xF2B9, 0xF2BB, 0xF2BD, 0xF2C2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
move_or_drop = { 0xF30B: False, 0xF30C: False, 0xF374: True, 0xF219: 0xF3A5 }
|
||||||
|
swap_codes = [ (0xF167, 0xF16A), (0xF219, 0xF3A5), ]
|
||||||
|
|
||||||
block_regular = set()
|
block_regular = set()
|
||||||
|
|
||||||
print('# Intermediate mapping file')
|
print('# Intermediate mapping file')
|
||||||
|
@ -134,8 +147,13 @@ print('#')
|
||||||
|
|
||||||
# Reorder processing to accomodate for glyph shifts introduced
|
# Reorder processing to accomodate for glyph shifts introduced
|
||||||
all_points = [ *range(0xF000, 0xF900), *range(0xE000, 0xF000) ]
|
all_points = [ *range(0xF000, 0xF900), *range(0xE000, 0xF000) ]
|
||||||
move_or_drop = { 0xF30B: False, 0xF30C: False, 0xF374: True }
|
|
||||||
for code, move in move_or_drop.items():
|
for code, move in move_or_drop.items():
|
||||||
|
if not isinstance(move, bool):
|
||||||
|
i1 = all_points.index(code)
|
||||||
|
i2 = all_points.index(move)
|
||||||
|
all_points[i1] = move
|
||||||
|
all_points[i2] = code
|
||||||
|
continue
|
||||||
all_points.remove(code)
|
all_points.remove(code)
|
||||||
if move:
|
if move:
|
||||||
all_points.append(code)
|
all_points.append(code)
|
||||||
|
|
Loading…
Reference in a new issue