Last active
December 9, 2021 14:00
-
-
Save keighl/5434540 to your computer and use it in GitHub Desktop.
Rename a font to have the same Family/Fullname/Postscript name. This prevents IE from choking in @font-face
This file contains hidden or 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
# FontForge command | |
fontforge -script 2ttf.pe ProprietaryFontCondensedBold.otf | |
# 2ttf.pe | |
# FontForge Script | |
# http://fontforge.org/scripting.html | |
# | |
# * Opens the font file | |
# * Sets the family/fullname/postscript name be the same as the filename (without ext) | |
# * Writes it to the disk as TTF | |
Open($1) | |
SetFontNames($1:r,$1:r,$1:r) | |
Generate($1:r + ".ttf") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to fix this because
$1:r
is full path, if you are not in the font directory it contains slashes that are not allowed in font names