Skip to content

Instantly share code, notes, and snippets.

View jdbdnz's full-sized avatar

Josh Dean jdbdnz

View GitHub Profile
@jdbdnz
jdbdnz / fontforge-limit-glyphs.py
Last active November 3, 2020 10:24
Limit FontAwesome to just those Glyphs I want to use
# Open font in [fontforge](https://fontforge.github.io/en-US/) (FontAwesome's [fa-solid-900.woff](https://github.com/FortAwesome/Font-Awesome/blob/master/webfonts/fa-solid-900.woff) in my case)
# So you can see what you're doing: Menu > Encoding > Compact
# ctrl+a to select all glyphs
# ctrl+. should open Execute Script
# Ensure desiredGlyphNames includes all glyphs used in app
desiredGlyphNames = ["caret-down", "caret-up", "chart-bar", "check", "chevron-down", "clipboard-list", "comments", "expand", "filter", "flask", "images", "info-circle", "layer-group", "redo", "ruler", "ruler-horizontal", "ruler-vertical", "sort-amount-down", "star", "table", "tag", "users", "video"]
font = fontforge.activeFont()