From 1820d4e341b2fc509dbc46ba61830481afe7a9aa Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Mon, 8 May 2023 12:26:30 +0200 Subject: [PATCH 1/2] Octicons: Create missing file-symlink-directory (1/2) [why] Some people, for example the `lsd` project, need an icon with a symlink directory. That has been dropped by Octicons. Our repacking put some unrelated bookmark icon on that codepoint; but even an empty glyph would be not ideal. [how] Design a file-symlink-directory from file-symlink-file and file-directory. In this way it fits nicely into the current design of Octicons. Sneak that into the unpacked Octicons archive. Adapt mapping manually to keep as much as possible constant. Signed-off-by: Fini Jastrow --- font-patcher | 6 +++--- src/glyphs/octicons/file-symlink-directory-16.svg | 1 + src/glyphs/octicons/file-symlink-directory-24.svg | 1 + src/glyphs/octicons/generate | 5 +++-- src/glyphs/octicons/mapping | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 src/glyphs/octicons/file-symlink-directory-16.svg create mode 100644 src/glyphs/octicons/file-symlink-directory-24.svg diff --git a/font-patcher b/font-patcher index aac307ed22..6eb4207d29 100755 --- a/font-patcher +++ b/font-patcher @@ -6,7 +6,7 @@ from __future__ import absolute_import, print_function, unicode_literals # Change the script version when you edit this script: -script_version = "4.2.1" +script_version = "4.3.0" version = "3.0.0" projectName = "Nerd Fonts" @@ -994,7 +994,7 @@ class font_patcher: ], [0xf09c, 0xf09f, 0xf0de], # bells range(0xf2c2, 0xf2c5 + 1), # move to - [0xf07b, 0xf0a1, 0xf0d6], # bookmarks + [0xf07b, 0xf0a1, 0xf0d6, 0xf306], # bookmarks ]} WEATH_SCALE_LIST = {'ScaleGroups': [ [0xf03c, 0xf042, 0xf045 ], # degree signs @@ -1043,7 +1043,7 @@ class font_patcher: {'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "octicons/octicons.ttf", 'Exact': False, 'SymStart': 0xF000, 'SymEnd': 0xF105, 'SrcStart': 0xF400, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Magnifying glass {'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': False, 'SymStart': 0xF27C, 'SymEnd': 0xF305, '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.custom, 'Name': "Custom", 'Filename': self.args.custom, 'Exact': True, 'SymStart': 0x0000, 'SymEnd': 0x0000, 'SrcStart': None, 'ScaleRules': None, 'Attributes': CUSTOM_ATTR} ] diff --git a/src/glyphs/octicons/file-symlink-directory-16.svg b/src/glyphs/octicons/file-symlink-directory-16.svg new file mode 100644 index 0000000000..af5dbe17ba --- /dev/null +++ b/src/glyphs/octicons/file-symlink-directory-16.svg @@ -0,0 +1 @@ + diff --git a/src/glyphs/octicons/file-symlink-directory-24.svg b/src/glyphs/octicons/file-symlink-directory-24.svg new file mode 100644 index 0000000000..cb48984fcb --- /dev/null +++ b/src/glyphs/octicons/file-symlink-directory-24.svg @@ -0,0 +1 @@ + diff --git a/src/glyphs/octicons/generate b/src/glyphs/octicons/generate index b9e7722133..31970b1228 100755 --- a/src/glyphs/octicons/generate +++ b/src/glyphs/octicons/generate @@ -8,7 +8,8 @@ import subprocess import fontforge # Double-quotes required here, for version-bump.sh: -version = "2.3.3" +# version-bump.sh is not working here, need to adjust manually! +version = "3.0.0" archive = 'v18.3.0.tar.gz' @@ -70,7 +71,7 @@ print('Fetching octicons archive "{}"\n'.format(archive)) if subprocess.call('curl -OL https://github.com/primer/octicons/archive/' + archive, shell=True): sys.exit('Error fetching octicons archive') print('\nUnpacking octicons archive') -if subprocess.call('rm -rf icons octicons-* && tar zxf *.gz && mv octicons-*/icons . && rm -rf octicons-*', shell=True): +if subprocess.call('rm -rf icons octicons-* && tar zxf *.gz && mv octicons-*/icons . && rm -rf octicons-* && cp file-symlink-directory-*.svg icons', shell=True): sys.exit('Error unpacking archive') svgs = os.listdir(vectorsdir) diff --git a/src/glyphs/octicons/mapping b/src/glyphs/octicons/mapping index 880fca02a1..580becc792 100644 --- a/src/glyphs/octicons/mapping +++ b/src/glyphs/octicons/mapping @@ -130,7 +130,7 @@ F0AA F47E triangle-up F0AC F47F git-compare F0AD F480 logo-gist F0B0 F481 file-symlink-file -F0B1 F482 bookmark-slash +F0B1 F482 file-symlink-directory F0B2 F483 squirrel F0B6 F484 globe F0BA F485 unmute @@ -307,3 +307,4 @@ F302 F52F x-circle F303 F530 x-circle-fill F304 F531 zoom-in F305 F532 zoom-out +F306 F533 bookmark-slash From 9f54f24738fd6ed7fe5799ba1488afb48ac5d40b Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Mon, 8 May 2023 12:44:18 +0200 Subject: [PATCH 2/2] Octicons: Create missing file-symlink-directory (2/2) Just run ./generate. Compare commit 7764e05 Create new octicons.ttf (update to v18.3.0) (2/2) Fixes: 1213 Signed-off-by: Fini Jastrow --- bin/scripts/lib/i_oct.sh | 7 ++++--- src/glyphs/octicons/octicons.ttf | Bin 76520 -> 76796 bytes 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/scripts/lib/i_oct.sh b/bin/scripts/lib/i_oct.sh index 3eeeb4ecdd..d426537abf 100644 --- a/bin/scripts/lib/i_oct.sh +++ b/bin/scripts/lib/i_oct.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Octicons (309 icons) -# Codepoints: 2665-F532 with gaps +# Octicons (310 icons) +# Codepoints: 2665-F533 with gaps # Nerd Fonts Version: 3.0.0 # Script Version: (autogenerated) test -n "$__i_oct_loaded" && return || __i_oct_loaded=1 @@ -136,7 +136,7 @@ i='' i_oct_triangle_up=$i i='' i_oct_git_compare=$i i='' i_oct_logo_gist=$i i='' i_oct_file_symlink_file=$i -i='' i_oct_bookmark_slash=$i +i='' i_oct_file_symlink_directory=$i i='' i_oct_squirrel=$i i='' i_oct_globe=$i i='' i_oct_unmute=$i @@ -313,4 +313,5 @@ i='' i_oct_x_circle=$i i='' i_oct_x_circle_fill=$i i='' i_oct_zoom_in=$i i='' i_oct_zoom_out=$i +i='' i_oct_bookmark_slash=$i unset i diff --git a/src/glyphs/octicons/octicons.ttf b/src/glyphs/octicons/octicons.ttf index f864314465d20e0fef1e59c76720d4be5a77e4ee..1ed38ae5220ada1b51fcceb4f60009367c4e84f0 100644 GIT binary patch delta 1265 zcmXw3drVVj6hG(owv<8(Smd>;RqBOdTDrbgo37-tNT#cakdF)_rL#SoXUgg^F37H1eS&TM4q<|AaXc3+j<JJPO8Jw9~6U*od>{;5TACK z1HM#>oWvc^2rFZ$Tmzs+++K@$k(nTzJ5G4N#~kwE1obWP$qj(G*X*%<^-S_NU@;lUQu@4s;PNM1 ze+S$|Y{Ao4%dh~7th}<$oZ9D*#U(nx(#Rz5|DJl8G;#SHH{o2M&Lu0cdP;^y6X&oy3#B*iSie z6TN{&VO89pk%936ZV`qrygi{U(q5^ms2Z!fUoEfht&Y`5YD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