https://github.com/dcts/font-converter-ubuntu
convert any OTF (open type format) font to WOFF, WOFF2, EOT and TTF. Because online converters never work.
https://github.com/dcts/font-converter-ubuntu
Last synced: about 1 year ago
JSON representation
convert any OTF (open type format) font to WOFF, WOFF2, EOT and TTF. Because online converters never work.
- Host: GitHub
- URL: https://github.com/dcts/font-converter-ubuntu
- Owner: dcts
- Created: 2021-08-27T14:44:34.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-27T15:26:16.000Z (almost 5 years ago)
- Last Synced: 2025-04-10T20:26:00.016Z (about 1 year ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local Font Converter
This does only work for Ubuntu. Taken from this [article by Jan Küster](https://dev.to/jankapunkt/converting-my-otf-font-into-multiple-web-fonts-with-this-bash-script-m1l).
## Prerequisites
You need to have the following packages installed:
|package|command|description|
|---|---|---|
|`eot-utils`|`mkeot`|convert otf to eot|
|`eot2ttf`|`eot2ttf`|convert eot to ttf|
|`woff-tools`|`sfnt2woff`|convert otf to woff|
|`woff2`|`woff2_compress`|convert ttf to woff2|
you can install them with:
```bash
# install dependencies (packages)
sudo apt install eot-utils
sudo apt install eot2ttf
sudo apt install woff-tools
sudo apt install woff2
# check if commands exist
which mkeot
which eot2ttf
which sfnt2woff
which woff2_compress
```
# Usage
```bash
convertOtf input.otf /path/to/output/
# EXAMPLE
mkdir out
convertOtf myFont-otf out
```
# make script runnable and add to PATH
Inside the repo, run
```bash
# make runnable
sudo chmod +x ./convertOtf
# add current directory to your PATH
pwd # copy the directory and add to your PATH
```