Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update octicons and drop old MDI #1156

Merged
merged 3 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 172 additions & 33 deletions bin/scripts/lib/i_oct.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
# Octicons (172 icons)
# Codepoints: 2665, 26A1, Nerd Fonts moved F000-F105 with holes → F400-F4A8, F27C → F67C
# Octicons (309 icons)
# Codepoints: 2665-F532 with gaps
# Nerd Fonts Version: 2.3.3
# Script Version: (autogenerated)
test -n "$__i_oct_loaded" && return || __i_oct_loaded=1
i='♥' i_oct_heart=$i
i='⚡' i_oct_zap=$i
Expand All @@ -10,23 +12,23 @@ i='' i_oct_repo_forked=$i
i='' i_oct_repo_push=$i
i='' i_oct_repo_pull=$i
i='' i_oct_book=$i
i='' i_oct_octoface=$i
i='' i_oct_accessibility=$i
i='' i_oct_git_pull_request=$i
i='' i_oct_mark_github=$i
i='' i_oct_cloud_download=$i
i='' i_oct_cloud_upload=$i
i='' i_oct_keyboard=$i
i='' i_oct_gist=$i
i='' i_oct_download=$i
i='' i_oct_upload=$i
i='' i_oct_accessibility_inset=$i
i='' i_oct_alert_fill=$i
i='' i_oct_file_code=$i
i='' i_oct_file_text=$i
i='' i_oct_apps=$i
i='' i_oct_file_media=$i
i='' i_oct_file_zip=$i
i='' i_oct_file_pdf=$i
i='' i_oct_archive=$i
i='' i_oct_tag=$i
i='' i_oct_file_directory=$i
i='' i_oct_file_submodule=$i
i='' i_oct_person=$i
i='' i_oct_jersey=$i
i='' i_oct_arrow_both=$i
i='' i_oct_git_commit=$i
i='' i_oct_git_branch=$i
i='' i_oct_git_merge=$i
Expand All @@ -40,19 +42,19 @@ i='' i_oct_question=$i
i='' i_oct_alert=$i
i='' i_oct_search=$i
i='' i_oct_gear=$i
i='' i_oct_radio_tower=$i
i='' i_oct_arrow_down_left=$i
i='' i_oct_tools=$i
i='' i_oct_sign_out=$i
i='' i_oct_rocket=$i
i='' i_oct_rss=$i
i='' i_oct_clippy=$i
i='' i_oct_paste=$i
i='' i_oct_sign_in=$i
i='' i_oct_organization=$i
i='' i_oct_device_mobile=$i
i='' i_oct_unfold=$i
i='' i_oct_check=$i
i='' i_oct_mail=$i
i='' i_oct_mail_read=$i
i='' i_oct_read=$i
i='' i_oct_arrow_up=$i
i='' i_oct_arrow_right=$i
i='' i_oct_arrow_down=$i
Expand All @@ -66,14 +68,14 @@ i='' i_oct_clock=$i
i='' i_oct_ruby=$i
i='' i_oct_broadcast=$i
i='' i_oct_key=$i
i='' i_oct_repo_force_push=$i
i='' i_oct_arrow_down_right=$i
i='' i_oct_repo_clone=$i
i='' i_oct_diff=$i
i='' i_oct_eye=$i
i='' i_oct_comment_discussion=$i
i='' i_oct_mail_reply=$i
i='' i_oct_primitive_dot=$i
i='' i_oct_primitive_square=$i
i='' i_oct_arrow_switch=$i
i='' i_oct_dot_fill=$i
i='' i_oct_square_fill=$i
i='' i_oct_device_camera=$i
i='' i_oct_device_camera_video=$i
i='' i_oct_pencil=$i
Expand All @@ -96,14 +98,14 @@ i='' i_oct_diff_removed=$i
i='' i_oct_diff_modified=$i
i='' i_oct_diff_renamed=$i
i='' i_oct_horizontal_rule=$i
i='' i_oct_arrow_small_right=$i
i='' i_oct_arrow_up_left=$i
i='' i_oct_milestone=$i
i='' i_oct_checklist=$i
i='' i_oct_megaphone=$i
i='' i_oct_chevron_right=$i
i='' i_oct_bookmark=$i
i='' i_oct_settings=$i
i='' i_oct_dashboard=$i
i='' i_oct_sliders=$i
i='' i_oct_meter=$i
i='' i_oct_history=$i
i='' i_oct_link_external=$i
i='' i_oct_mute=$i
Expand All @@ -112,7 +114,7 @@ i='' i_oct_circle_slash=$i
i='' i_oct_pulse=$i
i='' i_oct_sync=$i
i='' i_oct_telescope=$i
i='' i_oct_gist_secret=$i
i='' i_oct_arrow_up_right=$i
i='' i_oct_home=$i
i='' i_oct_stop=$i
i='' i_oct_bug=$i
Expand All @@ -122,19 +124,19 @@ i='' i_oct_database=$i
i='' i_oct_server=$i
i='' i_oct_diff_ignored=$i
i='' i_oct_ellipsis=$i
i='' i_oct_no_newline=$i
i='' i_oct_bell_fill=$i
i='' i_oct_hubot=$i
i='' i_oct_arrow_small_up=$i
i='' i_oct_arrow_small_down=$i
i='' i_oct_arrow_small_left=$i
i='' i_oct_bell_slash=$i
i='' i_oct_blocked=$i
i='' i_oct_bookmark_fill=$i
i='' i_oct_chevron_up=$i
i='' i_oct_chevron_down=$i
i='' i_oct_chevron_left=$i
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_file_symlink_directory=$i
i='' i_oct_bookmark_slash=$i
i='' i_oct_squirrel=$i
i='' i_oct_globe=$i
i='' i_oct_unmute=$i
Expand All @@ -146,32 +148,169 @@ i='' i_oct_markdown=$i
i='' i_oct_dash=$i
i='' i_oct_fold=$i
i='' i_oct_inbox=$i
i='' i_oct_trashcan=$i
i='' i_oct_paintcan=$i
i='' i_oct_trash=$i
i='' i_oct_paintbrush=$i
i='' i_oct_flame=$i
i='' i_oct_briefcase=$i
i='' i_oct_plug=$i
i='' i_oct_circuit_board=$i
i='' i_oct_bookmark_slash_fill=$i
i='' i_oct_mortar_board=$i
i='' i_oct_law=$i
i='' i_oct_thumbsup=$i
i='' i_oct_thumbsdown=$i
i='' i_oct_desktop_download=$i
i='' i_oct_beaker=$i
i='' i_oct_bell=$i
i='' i_oct_watch=$i
i='' i_oct_cache=$i
i='' i_oct_shield=$i
i='' i_oct_bold=$i
i='' i_oct_text_size=$i
i='' i_oct_check_circle=$i
i='' i_oct_italic=$i
i='' i_oct_tasklist=$i
i='' i_oct_verified=$i
i='' i_oct_smiley=$i
i='' i_oct_unverified=$i
i='' i_oct_ellipses=$i
i='' i_oct_check_circle_fill=$i
i='' i_oct_file=$i
i='' i_oct_grabber=$i
i='' i_oct_plus_small=$i
i='' i_oct_checkbox=$i
i='' i_oct_reply=$i
i='' i_oct_device_desktop=$i
i='' i_oct_circle=$i
i='' i_oct_clock_fill=$i
i='' i_oct_cloud=$i
i='' i_oct_cloud_offline=$i
i='' i_oct_code_of_conduct=$i
i='' i_oct_code_review=$i
i='' i_oct_code_square=$i
i='' i_oct_codescan=$i
i='' i_oct_codescan_checkmark=$i
i='' i_oct_codespaces=$i
i='' i_oct_columns=$i
i='' i_oct_command_palette=$i
i='' i_oct_commit=$i
i='' i_oct_container=$i
i='' i_oct_copilot=$i
i='' i_oct_copilot_error=$i
i='' i_oct_copilot_warning=$i
i='' i_oct_copy=$i
i='' i_oct_cpu=$i
i='' i_oct_cross_reference=$i
i='' i_oct_dependabot=$i
i='' i_oct_diamond=$i
i='' i_oct_discussion_closed=$i
i='' i_oct_discussion_duplicate=$i
i='' i_oct_discussion_outdated=$i
i='' i_oct_dot=$i
i='' i_oct_duplicate=$i
i='' i_oct_eye_closed=$i
i='' i_oct_feed_discussion=$i
i='' i_oct_feed_forked=$i
i='' i_oct_feed_heart=$i
i='' i_oct_feed_merged=$i
i='' i_oct_feed_person=$i
i='' i_oct_feed_repo=$i
i='' i_oct_feed_rocket=$i
i='' i_oct_feed_star=$i
i='' i_oct_feed_tag=$i
i='' i_oct_feed_trophy=$i
i='' i_oct_file_added=$i
i='' i_oct_file_badge=$i
i='' i_oct_file_diff=$i
i='' i_oct_file_directory_fill=$i
i='' i_oct_file_directory_open_fill=$i
i='' i_oct_file_moved=$i
i='' i_oct_file_removed=$i
i='' i_oct_filter=$i
i='' i_oct_fiscal_host=$i
i='' i_oct_fold_down=$i
i='' i_oct_fold_up=$i
i='' i_oct_git_merge_queue=$i
i='' i_oct_git_pull_request_closed=$i
i='' i_oct_git_pull_request_draft=$i
i='' i_oct_goal=$i
i='' i_oct_hash=$i
i='' i_oct_heading=$i
i='' i_oct_heart_fill=$i
i='' i_oct_home_fill=$i
i='' i_oct_hourglass=$i
i='' i_oct_id_badge=$i
i='' i_oct_image=$i
i='' i_oct_infinity=$i
i='' i_oct_issue_draft=$i
i='' i_oct_issue_tracked_by=$i
i='' i_oct_issue_tracks=$i
i='' i_oct_iterations=$i
i='' i_oct_kebab_horizontal=$i
i='' i_oct_key_asterisk=$i
i='' i_oct_log=$i
i='' i_oct_moon=$i
i='' i_oct_move_to_bottom=$i
i='' i_oct_move_to_end=$i
i='' i_oct_move_to_start=$i
i='' i_oct_move_to_top=$i
i='' i_oct_multi_select=$i
i='' i_oct_no_entry=$i
i='' i_oct_north_star=$i
i='' i_oct_note=$i
i='' i_oct_number=$i
i='' i_oct_package_dependencies=$i
i='' i_oct_package_dependents=$i
i='' i_oct_paper_airplane=$i
i='' i_oct_paperclip=$i
i='' i_oct_passkey_fill=$i
i='' i_oct_people=$i
i='' i_oct_person_add=$i
i='' i_oct_person_fill=$i
i='' i_oct_play=$i
i='' i_oct_plus_circle=$i
i='' i_oct_project=$i
i='' i_oct_project_roadmap=$i
i='' i_oct_project_symlink=$i
i='' i_oct_project_template=$i
i='' i_oct_rel_file_path=$i
i='' i_oct_repo_deleted=$i
i='' i_oct_repo_locked=$i
i='' i_oct_repo_template=$i
i='' i_oct_report=$i
i='' i_oct_rows=$i
i='' i_oct_screen_full=$i
i='' i_oct_screen_normal=$i
i='' i_oct_share=$i
i='' i_oct_share_android=$i
i='' i_oct_shield_check=$i
i='' i_oct_shield_lock=$i
i='' i_oct_shield_slash=$i
i='' i_oct_shield_x=$i
i='' i_oct_sidebar_collapse=$i
i='' i_oct_sidebar_expand=$i
i='' i_oct_single_select=$i
i='' i_oct_skip=$i
i='' i_oct_skip_fill=$i
i='' i_oct_sort_asc=$i
i='' i_oct_sort_desc=$i
i='' i_oct_sparkle_fill=$i
i='' i_oct_sponsor_tiers=$i
i='' i_oct_square=$i
i='' i_oct_stack=$i
i='' i_oct_star_fill=$i
i='' i_oct_stopwatch=$i
i='' i_oct_strikethrough=$i
i='' i_oct_sun=$i
i='' i_oct_tab=$i
i='' i_oct_tab_external=$i
i='' i_oct_table=$i
i='' i_oct_telescope_fill=$i
i='' i_oct_trophy=$i
i='' i_oct_typography=$i
i='' i_oct_unlink=$i
i='' i_oct_unlock=$i
i='' i_oct_unread=$i
i='' i_oct_video=$i
i='' i_oct_webhook=$i
i='' i_oct_workflow=$i
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
unset i
12 changes: 6 additions & 6 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.0"
script_version = "4.1.0"

version = "2.3.3"
projectName = "Nerd Fonts"
Expand Down Expand Up @@ -1027,14 +1027,14 @@ class font_patcher:
{'Enabled': self.args.fontawesomeextension, 'Name': "Font Awesome Extension", 'Filename': "font-awesome-extension.ttf", 'Exact': False, 'SymStart': 0xE000, 'SymEnd': 0xE0A9, 'SrcStart': 0xE200, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT}, # Maximize
{'Enabled': self.args.powersymbols, 'Name': "Power Symbols", 'Filename': "Unicode_IEC_symbol_font.otf", 'Exact': True, 'SymStart': 0x23FB, 'SymEnd': 0x23FE, 'SrcStart': None, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT}, # Power, Power On/Off, Power On, Sleep
{'Enabled': self.args.powersymbols, 'Name': "Power Symbols", 'Filename': "Unicode_IEC_symbol_font.otf", 'Exact': True, 'SymStart': 0x2B58, 'SymEnd': 0x2B58, 'SrcStart': None, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT}, # Heavy Circle (aka Power Off)
{'Enabled': self.args.material, 'Name': "Material legacy", 'Filename': "materialdesignicons-webfont.ttf", 'Exact': False, 'SymStart': 0xF001, 'SymEnd': 0xF847, 'SrcStart': 0xF500, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': False , 'Name': "Material legacy", 'Filename': "materialdesignicons-webfont.ttf", 'Exact': False, 'SymStart': 0xF001, 'SymEnd': 0xF847, 'SrcStart': 0xF500, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.material, 'Name': "Material", 'Filename': "materialdesign/MaterialDesignIconsDesktop.ttf", 'Exact': True, 'SymStart': 0xF0001,'SymEnd': 0xF1AF0,'SrcStart': None, 'ScaleRules': MDI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.weather, 'Name': "Weather Icons", 'Filename': "weather-icons/weathericons-regular-webfont.ttf", 'Exact': False, 'SymStart': 0xF000, 'SymEnd': 0xF0EB, 'SrcStart': 0xE300, 'ScaleRules': WEATH_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.fontlogos, 'Name': "Font Logos", 'Filename': "font-logos.ttf", 'Exact': True, 'SymStart': 0xF300, 'SymEnd': 0xF32F, 'SrcStart': None, 'ScaleRules': None, 'Attributes': SYM_ATTR_DEFAULT},
{'Enabled': self.args.octicons, 'Name': "Octicons", 'Filename': "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.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.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.ttf", 'Exact': False, 'SymStart': 0xF27C, 'SymEnd': 0xF27C, 'SrcStart': 0xF4A9, 'ScaleRules': OCTI_SCALE_LIST, 'Attributes': SYM_ATTR_DEFAULT}, # Desktop
{'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.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}
]
Expand Down
Binary file removed src/glyphs/octicons.ttf
Binary file not shown.
21 changes: 21 additions & 0 deletions src/glyphs/octicons/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
32 changes: 32 additions & 0 deletions src/glyphs/octicons/analyze_octicons
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python3
# coding=utf8

# This extracts the names and source and destination codepoints
# of the old octicons font file to keep their codepoints stable
#
# You do not need to redo it, the result is in the repo
#
# Usage:
# fontforge analyze_octicons > mapping

import fontforge

octi_orig = "octicons.ttf"
current_cp = 0xF400

print('# Examining {}'.format(octi_orig))

font = fontforge.open(octi_orig)
for glyph in font.glyphs('encoding'):
point = glyph.unicode
if point < 0:
continue
desti = glyph.unicode
if point < 0xF000:
desti = point
else:
desti = current_cp
current_cp += 1
print("{:X} {:X} {}".format(point, desti, glyph.glyphname))

font.close()
Loading