Skip to content

Commit

Permalink
adjust nerdfont glyph size and position
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota2357 committed Jun 4, 2023
1 parent 866d3b9 commit fc2d320
Showing 1 changed file with 81 additions and 28 deletions.
109 changes: 81 additions & 28 deletions src/bundle_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,94 +31,147 @@
SOURCES_INFO = [
{ # Seti-UI + Custom
"path": join(GLYPHS_PATH, "original-source.otf"),
"ranges": [(0xe5fa, 0xe6ff)],
"remaps": [(0xe4fa, 0xe5ff)],
"scale": (1, 1),
"translate": (0, 0)
"ranges": [(0xe5fa, 0xe6ad)],
"remaps": [(0xe4fa, 0xe5ad)],
"scale": (0.83, 0.83),
"translate": (-310, -140)
},
{ # Devicons (https://vorillaz.github.io/devicons/)
"path": join(GLYPHS_PATH, "devicons.ttf"),
"ranges": [(0xe700, 0xe7c5)],
"remaps": [(0xe600, 0xe6c5)],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.87, 0.87),
"translate": (-300, -110),
"modify": """
0xe700 (1, 1) (-75, 0) # 
0xe78c (1, 1) (-65, 0) # 
0xe78f (1, 1) (-20, 0) # 
0xe7a4 (1, 1) (-80, 0) # 
0xe7c4 (1, 1) (-90, 0) # 
"""
},
{ # Font Awesome (https://github.com/FortAwesome/Font-Awesome)
"path": join(GLYPHS_PATH, "font-awesome", "FontAwesome.otf"),
"ranges": [(0xf000, 0xf2e0)],
"remaps": [None],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.8, 0.8),
"translate": (-100, 80),
"modify": """
[0xf0d7, 0xf0da] (1, 1) (45, 0) #  ~ 
[0xf0dd, 0xf0de] (1, 1) (45, 0) #  ~ 
[0xf100, 0xf103] (1, 1) (60, 0) #  ~ 
[0xf104, 0xf105] (1, 1) (240, 0) #  ~ 
[0xf106, 0xf107] (1, 1) (55, 0) #  ~ 
[0xf175, 0xf176] (1, 1) (160, 0) #  ~ 
0xf276 (1, 1) (45, 0) # 
0xf294 (1, 1) (100, 0) # 
[0xf2c7, 0xf2cb] (1, 1) (40, 0) #  ~ 
"""
},
{ # Font Awesome Extension (https://github.com/AndreLZGava/font-awesome-extension)
"path": join(GLYPHS_PATH, "font-awesome-extension.ttf"),
"ranges": [(0xe200, 0xe2a9)],
"remaps": [(0xe000, 0xe0a9)],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.8, 0.8),
"translate": (-310, -80)
},
{ # Material Design Icons (https://github.com/Templarian/MaterialDesign)
"path": join(GLYPHS_PATH, "materialdesign", "MaterialDesignIconsDesktop.ttf"),
"ranges": [(0xf0001, 0xf1af0)],
"remaps": [None],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.9, 0.9),
"translate": (-410, 0)
},
{ # Weather (https://github.com/erikflowers/weather-icons)
"path": join(GLYPHS_PATH, "weather-icons", "weathericons-regular-webfont.ttf"),
"ranges": [(0xe300, 0xe3e3)],
"remaps": [(0xf000, 0xf0eb)],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.9, 0.9),
"translate": (0, 0),
"modify": """
[0xe300, 0xe338] (0.8, 0.8) (0, 0) #  ~ 
0xe339 (1, 1) (0, -300) # 
0xe341 (1, 1) (0, -300) # 
0xe34e (0.9, 0.9) (75, -110) # 
0xe34f (1, 1) (270, 0) # 
0xe350 (0.9, 0.9) (75, -110) # 
[0xe35e, 0xe367] (0.9, 0.9) (0, 0) #  ~ 
[0xe3aa, 0xe3ad] (0.8, 0.8) (0, 0) #  ~ 
"""
},
{ # Octicons (https://github.com/primer/octicons)
"path": join(GLYPHS_PATH, "octicons", "octicons.ttf"),
"ranges": [(0xf400, 0xf532), (0x2665,), (0x26a1,)],
"remaps": [(0xf000, 0xf305), None, None],
"scale": (1, 1),
"translate": (0, 0),
"scale": (0.695, 0.695),
"translate": (-200, 230),
"modify": """
0xf480 (1, 1) (0, -250) # 
"""
},
{ # Powerline Symbols
"path": join(GLYPHS_PATH, "powerline-symbols", "PowerlineSymbols.otf"),
"ranges": [(0xe0a0, 0xe0a2), (0xe0b0, 0xe0b3)],
"remaps": [None, None],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.97, 0.887),
"translate": (0, -109),
"modify": """
0xe0a0 (1, 1) (-60, 0) # 
"""
},
{ # Powerline Extra Symbols (https://github.com/ryanoasis/powerline-extra-symbols)
"path": join(GLYPHS_PATH, "PowerlineExtraSymbols.otf"),
"ranges": [(0xe0a3,), (0xe0b4, 0xe0c8), (0xe0ca,), (0xe0cc, 0xe0d4)], # 最後の間違ってそう
"ranges": [(0xe0a3,), (0xe0b4, 0xe0c8), (0xe0ca,), (0xe0cc, 0xe0d4)],
"remaps": [None, None, None, None],
"scale": (1, 1),
"translate": (0, 0)
"translate": (0, 0),
"modify": """
0xe0a3 (0.85, 0.85) (0, 0) # 
[0xe0b4, 0xe0b7] (0.84, 0.84) (0, 23) #  ~ 
[0xe0b8, 0xe0bf] (0.41, 0.82) (0, 0) #  ~ 
[0xe0c0, 0xe0c3] (0.87, 0.87) (0, 0) #  ~ 
[0xe0c4, 0xe0c7] (0.81, 0.81) (0, 40) #  ~ 
0xe0c8 (0.88, 0.88) (0, 50) # 
0xe0ca (0.88, 0.88) (0, 50) # 
[0xe0cc, 0xe0d2] (0.82, 0.82) (0, 0) #  ~ 
0xe0d4 (0.82, 0.82) (0, 0) # 
"""
},
{ # IEC Power Symbols (https://unicodepowersymbol.com/)
"path": join(GLYPHS_PATH, "Unicode_IEC_symbol_font.otf"),
"ranges": [(0x23fb, 0x23fe), (0x2b58,)],
"remaps": [None, None],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.8, 0.8),
"translate": (-280, -100),
},
{ # Font Logos (https://github.com/Lukas-W/font-logos)
"path": join(GLYPHS_PATH, "font-logos.ttf"),
"ranges": [(0xf300, 0xf32f)],
"remaps": [None],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.73, 0.73),
"translate": (0, 150)
},
{ # Pomicons (https://github.com/gabrielelana/pomicons)
"path": join(GLYPHS_PATH, "Pomicons.otf"),
"ranges": [(0xe000, 0xe00a)],
"remaps": [None],
"scale": (1, 1),
"translate": (0, 0)
"scale": (0.87, 0.87),
"translate": (-300, 0),
"modify": """
0xe009 (1, 1) (330, 0) # 
0xe00a (1, 1) (170, 0) # 
"""
},
{ # Codicons (https://github.com/microsoft/vscode-codicons)
"path": join(GLYPHS_PATH, "codicons", "codicon.ttf"),
"ranges": [(0xea60, 0xebeb)],
"remaps": [None],
"scale": (1, 1),
"translate": (0, 0),
"scale": (0.8, 0.8),
"translate": (-350, -220),
"modify": """
[0xea9d, 0xeaa0] (1, 1) (50, 0) #  ~ 
[0xeaa6, 0xeaa9] (1, 1) (40, 0) #  ~ 
"""
}
]

Expand Down

0 comments on commit fc2d320

Please sign in to comment.