kopia lustrzana https://github.com/tonsky/FiraCode
Build insturtions, moved build to root
rodzic
182470b88f
commit
acba6ee778
17
README.md
17
README.md
|
@ -180,6 +180,23 @@ Other monospaced fonts with ligatures:
|
||||||
- [Iosevka](https://be5invis.github.io/Iosevka/) (free)
|
- [Iosevka](https://be5invis.github.io/Iosevka/) (free)
|
||||||
- [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode) (free)
|
- [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode) (free)
|
||||||
|
|
||||||
|
### Building
|
||||||
|
|
||||||
|
On macOS:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo easy_install pip
|
||||||
|
pip install virtualenv --user
|
||||||
|
python -m virtualenv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install gftools
|
||||||
|
pip install fontmake
|
||||||
|
brew install ttfautohint
|
||||||
|
brew install woff2
|
||||||
|
```
|
||||||
|
|
||||||
|
Run `./build.sh`
|
||||||
|
|
||||||
### Credits
|
### Credits
|
||||||
|
|
||||||
- Author: Nikita Prokopov [@nikitonsky](https://twitter.com/nikitonsky)
|
- Author: Nikita Prokopov [@nikitonsky](https://twitter.com/nikitonsky)
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
# variable font
|
||||||
|
fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
|
||||||
|
|
||||||
|
# statics
|
||||||
|
fontmake -g FiraCode.glyphs -o ttf --output-dir distr/ttf
|
||||||
|
fontmake -g FiraCode.glyphs -o otf --output-dir distr/otf
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# Autohinting ================================================================
|
||||||
|
|
||||||
|
statics=$(ls distr/ttf/*.ttf)
|
||||||
|
for file in $statics; do
|
||||||
|
echo "fix DSIG in " ${file}
|
||||||
|
gftools fix-dsig --autofix ${file}
|
||||||
|
|
||||||
|
echo "TTFautohint " ${file}
|
||||||
|
# autohint with detailed info
|
||||||
|
hintedFile=${file/".ttf"/"-hinted.ttf"}
|
||||||
|
ttfautohint -I ${file} ${hintedFile} --stem-width-mode nnn
|
||||||
|
cp ${hintedFile} ${file}
|
||||||
|
rm -rf ${hintedFile}
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# Build woff2 fonts ==========================================================
|
||||||
|
|
||||||
|
# requires https://github.com/google/woff2
|
||||||
|
|
||||||
|
rm -rf distr/woff2
|
||||||
|
|
||||||
|
ttfs=$(ls distr/*/*.ttf)
|
||||||
|
for ttf in $ttfs; do
|
||||||
|
woff2_compress $ttf
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p distr/woff2
|
||||||
|
woff2s=$(ls distr/*/*.woff2)
|
||||||
|
for woff2 in $woff2s; do
|
||||||
|
mv $woff2 distr/woff2/$(basename $woff2)
|
||||||
|
done
|
|
@ -1,45 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source venv/bin/activate
|
|
||||||
|
|
||||||
# variable font
|
|
||||||
fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
|
|
||||||
|
|
||||||
# statics
|
|
||||||
fontmake -g FiraCode.glyphs -o ttf --output-dir distr/ttf
|
|
||||||
fontmake -g FiraCode.glyphs -o otf --output-dir distr/otf
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Autohinting ================================================================
|
|
||||||
|
|
||||||
statics=$(ls distr/ttf/*.ttf)
|
|
||||||
for file in $statics; do
|
|
||||||
echo "fix DSIG in " ${file}
|
|
||||||
gftools fix-dsig --autofix ${file}
|
|
||||||
|
|
||||||
echo "TTFautohint " ${file}
|
|
||||||
# autohint with detailed info
|
|
||||||
hintedFile=${file/".ttf"/"-hinted.ttf"}
|
|
||||||
ttfautohint -I ${file} ${hintedFile} --stem-width-mode nnn
|
|
||||||
cp ${hintedFile} ${file}
|
|
||||||
rm -rf ${hintedFile}
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Build woff2 fonts ==========================================================
|
|
||||||
|
|
||||||
# requires https://github.com/google/woff2
|
|
||||||
|
|
||||||
rm -rf distr/woff2
|
|
||||||
|
|
||||||
ttfs=$(ls distr/*/*.ttf)
|
|
||||||
for ttf in $ttfs; do
|
|
||||||
woff2_compress $ttf
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p distr/woff2
|
|
||||||
woff2s=$(ls distr/*/*.woff2)
|
|
||||||
for woff2 in $woff2s; do
|
|
||||||
mv $woff2 distr/woff2/$(basename $woff2)
|
|
||||||
done
|
|
|
@ -0,0 +1 @@
|
||||||
|
../../build.sh
|
Ładowanie…
Reference in New Issue