-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use product icons instead of 'hardcoded' icons
- Add a product icon font instead of icons that are unchangable by product icon themes - Add a script using FontForge scripting API for generating product icon font for future use - Remove redundant icons that are already part of codicons
- Loading branch information
1 parent
925119f
commit 938f264
Showing
22 changed files
with
484 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# FontForge script to generate a product icon font. | ||
# SVG icons are imported recursively; filenames must start with a 4-digit hexadecimal glyph codepoint followed by an underscore | ||
# Invoke by calling `fontforge -script <path_to_this_file>.py` | ||
|
||
import fontforge | ||
import os | ||
import re | ||
|
||
font = fontforge.font() | ||
|
||
for dir, _, files in os.walk(os.path.dirname(__file__)): | ||
for file in filter(lambda x: re.match('^[0-9a-f]{4}_.*svg$', x, re.IGNORECASE), files): | ||
code = file[:4]; fp = os.path.join(dir, file) | ||
font.createChar(int(code, 16)).importOutlines(fp) | ||
print(f'Added U+{code} -> {fp}') | ||
|
||
font.generate('product-icons.woff') |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.