Created
January 9, 2025 18:51
-
-
Save farkasmate/9afb39258091d22d2ca51917f6cb5409 to your computer and use it in GitHub Desktop.
Generate Terminus dfont font family for macOS on Alpine Linux
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
| #!/usr/bin/fontforge | |
| # NOTE: Generate macOS dfont family on Alpine Linux (depends on `font-terminus` and `fontforge` packages) | |
| # Usage: ./generate_terminus_font_family.ff 28 | |
| if ( $argc != 2 ) | |
| Error("Usage: " + $0 + " <px_size>"); | |
| endif | |
| font_array = ["/usr/share/fonts/misc/ter-u" + $1 + "n.otb", "/usr/share/fonts/misc/ter-u" + $1 + "b.otb"]; | |
| Open("/usr/share/fonts/misc/ter-u" + $1 + "b.otb"); | |
| Open("/usr/share/fonts/misc/ter-u" + $1 + "n.otb"); | |
| GenerateFamily("Terminus-" + $1 + ".dfont", "sbit", -1, font_array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment