Merge pull request #1544 from ryanoasis/feature/update-codicons

Update codicons to 0.0.35
This commit is contained in:
Fini 2024-03-17 15:31:21 +01:00 committed by GitHub
commit 59133b8d31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 98 additions and 13 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# coding=utf8 # coding=utf8
# Nerd Fonts Version: 3.1.1 # Nerd Fonts Version: 3.1.1
# Script Version: 1.1.1 # Script Version: 1.2.0
# Example Usage: # Example Usage:
# ./generate-glyph-info-from-set.py --font ../../src/glyphs/materialdesignicons-webfont.ttf --start f001 --end f847 --offset 4ff --prefix mdi # ./generate-glyph-info-from-set.py --font ../../src/glyphs/materialdesignicons-webfont.ttf --start f001 --end f847 --offset 4ff --prefix mdi
@ -66,9 +66,13 @@ elif args.symbolOffset:
signedOffset = int(sign+'0x'+format(offset, 'X'), 16) signedOffset = int(sign+'0x'+format(offset, 'X'), 16)
hexPosition = args.symbolFontStart + signedOffset hexPosition = args.symbolFontStart + signedOffset
symbolFont.selection.select((str("ranges"),str("unicode")),args.symbolFontStart,args.symbolFontEnd) allNames = {}
suppressedEntries = []
for index, sym_glyph in enumerate(symbolFont.selection.byGlyphs): symbolFont.encoding = 'UnicodeFull'
for index in range(args.symbolFontStart, args.symbolFontEnd + 1):
if not index in symbolFont:
continue
sym_glyph = symbolFont[index]
slot = format(sym_glyph.unicode, 'X') slot = format(sym_glyph.unicode, 'X')
name = sym_glyph.glyphname name = sym_glyph.glyphname
sh_name = "i_" + args.prefix + "_" + name.replace("-", "_") sh_name = "i_" + args.prefix + "_" + name.replace("-", "_")
@ -78,9 +82,18 @@ for index, sym_glyph in enumerate(symbolFont.selection.byGlyphs):
else: else:
char = chr(int('0x'+slot, 16) + signedOffset) char = chr(int('0x'+slot, 16) + signedOffset)
print("i='" + char + "' " + sh_name + "=$i") entryString = "i='" + char + "' " + sh_name + "=$i SLOT " + slot + ' ' + str(index)
if name not in allNames:
print(entryString)
else:
suppressedEntries.append(entryString)
ctr += 1 ctr += 1
hexPosition += 1 hexPosition += 1
allNames[name] = 1
print("Done, generated " + str(ctr) + " glyphs") print("Done, generated " + str(ctr) + " glyphs")
if len(suppressedEntries) > 0:
print('FOLLOGING ENTRIES SUPPRESSED to prevent double names with different codepoints:')
print('\n'.join(suppressedEntries))

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Nerd Fonts Version: 3.1.1 # Nerd Fonts Version: 3.1.1
# Script Version 1.2.0 # Script Version 1.3.0
# Usually this is called without argument. If the first argument # Usually this is called without argument. If the first argument
# is 'include-old-material' the old material design icons will be # is 'include-old-material' the old material design icons will be
@ -15,6 +15,12 @@ fi
for set in "${sets[@]}"; do for set in "${sets[@]}"; do
i="${base}/i_${set}.sh" i="${base}/i_${set}.sh"
dups=$(grep ' i_' "$i" | sed 's/.* i_//;s/=.*//' | sort | uniq -D | wc -l)
if [ "$dups" -gt 0 ]; then
echo "Found duplicate glyph names in ${i}"
grep ' i_' "$i" | sed 's/.* i_//;s/=.*//' | sort | uniq -D
exit 1
fi
# shellcheck disable=SC1090 # We check the sources individually # shellcheck disable=SC1090 # We check the sources individually
test -f "$i" -a -r "$i" && source "$i" test -f "$i" -a -r "$i" && source "$i"
done done

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Codicons (387 icons) # Codicons (439 icons)
# Codepoints: EA60-EBEB with holes # Codepoints: EA60-EC1E with holes
test -n "$__i_cod_loaded" && return || __i_cod_loaded=1 test -n "$__i_cod_loaded" && return || __i_cod_loaded=1
i='' i_cod_add=$i i='' i_cod_add=$i
i='' i_cod_lightbulb=$i i='' i_cod_lightbulb=$i
@ -389,4 +389,55 @@ i='' i_cod_azure_devops=$i
i='' i_cod_verified_filled=$i i='' i_cod_verified_filled=$i
i='' i_cod_newline=$i i='' i_cod_newline=$i
i='' i_cod_layout=$i i='' i_cod_layout=$i
i='' i_cod_layout_activitybar_left=$i
i='' i_cod_layout_activitybar_right=$i
i='' i_cod_layout_panel_left=$i
i='' i_cod_layout_panel_center=$i
i='' i_cod_layout_panel_justify=$i
i='' i_cod_layout_panel_right=$i
i='' i_cod_layout_panel=$i
i='' i_cod_layout_sidebar_left=$i
i='' i_cod_layout_sidebar_right=$i
i='' i_cod_layout_statusbar=$i
i='' i_cod_layout_menubar=$i
i='' i_cod_layout_centered=$i
i='' i_cod_target=$i
i='' i_cod_indent=$i
i='' i_cod_record_small=$i
i='' i_cod_error_small=$i
i='' i_cod_arrow_circle_down=$i
i='' i_cod_arrow_circle_left=$i
i='' i_cod_arrow_circle_right=$i
i='' i_cod_arrow_circle_up=$i
i='' i_cod_layout_sidebar_right_off=$i
i='' i_cod_layout_panel_off=$i
i='' i_cod_layout_sidebar_left_off=$i
i='' i_cod_blank=$i
i='' i_cod_heart_filled=$i
i='' i_cod_map=$i
i='' i_cod_map_filled=$i
i='' i_cod_circle_small=$i
i='' i_cod_bell_slash=$i
i='' i_cod_bell_slash_dot=$i
i='' i_cod_comment_unresolved=$i
i='' i_cod_git_pull_request_go_to_changes=$i
i='' i_cod_git_pull_request_new_changes=$i
i='' i_cod_search_fuzzy=$i
i='' i_cod_comment_draft=$i
i='' i_cod_send=$i
i='' i_cod_sparkle=$i
i='' i_cod_insert=$i
i='' i_cod_mic=$i
i='' i_cod_thumbsdown_filled=$i
i='' i_cod_thumbsup_filled=$i
i='' i_cod_coffee=$i
i='' i_cod_snake=$i
i='' i_cod_game=$i
i='' i_cod_vr=$i
i='' i_cod_chip=$i
i='' i_cod_piano=$i
i='' i_cod_music=$i
i='' i_cod_mic_filled=$i
i='' i_cod_git_fetch=$i
i='' i_cod_copilot=$i
unset i unset i

View file

@ -6,7 +6,7 @@
from __future__ import absolute_import, print_function, unicode_literals from __future__ import absolute_import, print_function, unicode_literals
# Change the script version when you edit this script: # Change the script version when you edit this script:
script_version = "4.8.5" script_version = "4.9.0"
version = "3.1.1" version = "3.1.1"
projectName = "Nerd Fonts" projectName = "Nerd Fonts"
@ -985,8 +985,15 @@ class font_patcher:
range(0x2594, 0x259f + 1), # quards (Note: quard 2597 in Hack is wrong, scales like block!) range(0x2594, 0x259f + 1), # quards (Note: quard 2597 in Hack is wrong, scales like block!)
]} ]}
CODI_SCALE_LIST = {'ScaleGroups': [ CODI_SCALE_LIST = {'ScaleGroups': [
range(0xeb6e, 0xeb71 + 1), # triangles [0xea61, 0xeb13], # lightbulb
range(0xeab4, 0xeab7 + 1), # chevrons range(0xeab4, 0xeab7 + 1), # chevrons
[0xea7d, *range(0xea99, 0xeaa1 + 1), 0xebcb], # arrows
[0xeaa2, 0xeb9a, 0xec08, 0xec09], # bells
range(0xead4, 0xead6 + 1), # dot and arrow
[0xeb43, 0xec0b, 0xec0c], # (pull) request changes
range(0xeb6e, 0xeb71 + 1), # triangles
[*range(0xeb89, 0xeb8b + 1), 0xec07], # smallish dots
range(0xebd5, 0xebd7 + 1), # compasses
]} ]}
DEVI_SCALE_LIST = {'ScaleGlyph': 0xE60E, # Android logo DEVI_SCALE_LIST = {'ScaleGlyph': 0xE60E, # Android logo
'GlyphsToScale': [ 'GlyphsToScale': [
@ -1077,7 +1084,7 @@ class font_patcher:
{'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': True, 'SymStart': 0x2665, 'SymEnd': 0x2665, 'SrcStart': None, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Heart {'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': True, 'SymStart': 0x2665, 'SymEnd': 0x2665, 'SrcStart': None, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Heart
{'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': True, 'SymStart': 0X26A1, 'SymEnd': 0X26A1, 'SrcStart': None, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Zap {'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': True, 'SymStart': 0X26A1, 'SymEnd': 0X26A1, 'SrcStart': None, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Zap
{'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': False, 'SymStart': 0xF27C, 'SymEnd': 0xF306, 'SrcStart': 0xF4A9, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, {'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': False, 'SymStart': 0xF27C, 'SymEnd': 0xF306, 'SrcStart': 0xF4A9, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.codicons, 'Name': "Codicons", 'Filename': "codicons/codicon.ttf", 'Exact': True, 'SymStart': 0xEA60, 'SymEnd': 0xEBEB, 'SrcStart': None, 'ScaleRules': CODI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, {'Enabled': self.args.codicons, 'Name': "Codicons", 'Filename': "codicons/codicon.ttf", 'Exact': True, 'SymStart': 0xEA60, 'SymEnd': 0xEC1E, 'SrcStart': None, 'ScaleRules': CODI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.custom, 'Name': "Custom", 'Filename': self.args.custom, 'Exact': True, 'SymStart': 0x0000, 'SymEnd': 0x0000, 'SrcStart': None, 'ScaleRules': None, 'Attributes': CUSTOM_ATTR} {'Enabled': self.args.custom, 'Name': "Custom", 'Filename': self.args.custom, 'Exact': True, 'SymStart': 0x0000, 'SymEnd': 0x0000, 'SrcStart': None, 'ScaleRules': None, 'Attributes': CUSTOM_ATTR}
] ]

View file

@ -0,0 +1,9 @@
# Codicons
For more information have a look at the upstream website: https://github.com/microsoft/vscode-codicons
## Source bugs fixed
Glyph 0xEB40 and 0xEB41 are defective in the original font. We fixed that manually.
Version: 0.0.35

Binary file not shown.

Binary file not shown.

View file

@ -40,8 +40,6 @@
022 i_seti_gulp gulp.svg 022 i_seti_gulp gulp.svg
023 i_seti_grunt grunt.svg 023 i_seti_grunt grunt.svg
024 i_custom_default file_nf.svg 024 i_custom_default file_nf.svg
024 i_seti_default
024 i_seti_text
025 i_seti_folder folder.svg 025 i_seti_folder folder.svg
026 i_seti_css css.svg 026 i_seti_css css.svg
027 i_seti_config config.svg 027 i_seti_config config.svg
@ -114,6 +112,7 @@
082 i_seti_dart dart.svg 082 i_seti_dart dart.svg
083 i_seti_db db.svg 083 i_seti_db db.svg
084 i_seti_default default.svg 084 i_seti_default default.svg
084 i_seti_text
085 i_seti_deprecation_cop deprecation-cop.svg 085 i_seti_deprecation_cop deprecation-cop.svg
086 i_seti_docker docker.svg 086 i_seti_docker docker.svg
087 i_seti_d d.svg 087 i_seti_d d.svg

Can't render this file because it has a wrong number of fields in line 13.