Skip to content

Commit

Permalink
Create new octicons.ttf (update to v18.3.0) (2/2)
Browse files Browse the repository at this point in the history
This commit does the actual update of the octicons.ttf font file.
The script to update is 'generate'. It uses the mapping file from the
previous commit to create a new compatible font.

Some icons have meanwhile been dropped. We use their codepoints for new
icons.

Also fix a little bug in the GlyphInfo writer.

Following the output of the actual script run.

$ ./generate                                                                                                                                                                                                                                        feature/update-octicons ● 1 … 5 ⚑ 5 

Reading mapping file
Found 172 entries
Fetching octicons archive "v18.3.0.tar.gz"

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  550k    0  550k    0     0   504k      0 --:--:--  0:00:01 --:--:--  919k

Unpacking octicons archive
Found 576 svgs
Found 309 icons after de-duplicating

Renamed cloud-download -> download
Renamed cloud-upload -> upload
Renamed clippy -> paste
Renamed mail-read -> read
Renamed primitive-dot -> dot-fill
Renamed primitive-square -> square-fill
Renamed settings -> sliders
Renamed dashboard -> meter
Renamed trashcan -> trash
Renamed paintcan -> paintbrush

Missing octoface
Missing keyboard
Missing gist
Missing file-text
Missing file-pdf
Missing jersey
Missing radio-tower
Missing repo-force-push
Missing mail-reply
Missing arrow-small-right
Missing gist-secret
Missing no-newline
Missing arrow-small-up
Missing arrow-small-down
Missing arrow-small-left
Missing file-symlink-directory
Missing circuit-board
Missing watch
Missing text-size
Missing ellipses
Missing plus-small

Found 151 (of 172, missing 21) and new 158
Filled in missing, remaining new 137
Appended remaining new, total new mapping 309
Generating octicons.ttf with 309 glyphs
Generating GlyphInfo i_oct.sh
Finished

Signed-off-by: Fini Jastrow <[email protected]>
  • Loading branch information
Finii committed Apr 24, 2023
1 parent 91953e2 commit 7764e05
Show file tree
Hide file tree
Showing 4 changed files with 342 additions and 67 deletions.
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
4 changes: 2 additions & 2 deletions src/glyphs/octicons/generate
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import fontforge
# Double-quotes required here, for version-bump.sh:
version = "2.3.3"

archive = 'v18.2.0.tar.gz'
archive = 'v18.3.0.tar.gz'

vectorsdir = 'icons'
fontdir = '.'
Expand Down Expand Up @@ -53,7 +53,7 @@ def createGlyphInfo(icon_datasets, filepathname, into):
f.write(u'test -n "$__i_oct_loaded" && return || __i_oct_loaded=1\n')
for _, codepoint, name in icon_datasets:
codepoint = int(codepoint, 16)
f.write(u"i='{}' i_oct_{}=$i\n".format(chr(codepoint), name))
f.write(u"i='{}' i_oct_{}=$i\n".format(chr(codepoint), name.replace('-', '_')))
f.write(u'unset i\n')

print('\nReading mapping file')
Expand Down
Loading

0 comments on commit 7764e05

Please sign in to comment.