You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a wonderful project, but think it would make sense to map the various icon packs to the unicode ranges used by the very popular and ubiquitous Nerd Fonts icon super pack. While the font fallback approach of icons-in-terminal works well for Linux, many often have to SSH into their server using a different platform as their client (Windows, iOS, etc.), where they're limited to selecting a single TrueType font.
The great thing is, by making the mapping consistent with Nerd Fonts for the glyphs that are common to both, we can have the best of both worlds.
I made a simple change to support arbitrary destination mapping, by adding a "dest-start" field to the json entries. For now, I just see if there's a dest-start value, and if so, set it to codepoint. If there's not, it will simply continue from the previous codepoint. This does require the json file entries to be organized sequentially, but this could be enhanced to be more robust.
--- a/scripts/generate_font.py
+++ b/scripts/generate_font.py
@@ -124,12 +124,15 @@ with open(sys.argv[1]) as config_file:
if "map-names" in json_file:
map_names = read_map_names(json_file["map-names"])
+ if "dest-start" in json_file:
+ codepoint = int(json_file["dest-start"], 16)
+
start = codepoint
inserted = []
for symbol in font.glyphs("encoding"):
- if codepoint == POWERLINE_START:
- codepoint = POWERLINE_END
+ #if codepoint == POWERLINE_START:
+ # codepoint = POWERLINE_END
if (symbol.encoding in excludes or
symbol.encoding < start_from or
(until > 0 and symbol.encoding >= until)):
And here's my updated config.json file that maps the common glyphs to Nerd Fonts ranges.
Thanks for sharing this. This patch allowed me to display all the icons alongside my preferred font. Unfortunately, the mapping from unicode to icon names is off. About half of the icons have a wrong name. Did you have the same issue?
This is a wonderful project, but think it would make sense to map the various icon packs to the unicode ranges used by the very popular and ubiquitous Nerd Fonts icon super pack. While the font fallback approach of icons-in-terminal works well for Linux, many often have to SSH into their server using a different platform as their client (Windows, iOS, etc.), where they're limited to selecting a single TrueType font.
The great thing is, by making the mapping consistent with Nerd Fonts for the glyphs that are common to both, we can have the best of both worlds.
I made a simple change to support arbitrary destination mapping, by adding a "dest-start" field to the json entries. For now, I just see if there's a dest-start value, and if so, set it to codepoint. If there's not, it will simply continue from the previous codepoint. This does require the json file entries to be organized sequentially, but this could be enhanced to be more robust.
And here's my updated config.json file that maps the common glyphs to Nerd Fonts ranges.
The text was updated successfully, but these errors were encountered: