diff --git a/README.md b/README.md index 89ab697..83ff66b 100644 --- a/README.md +++ b/README.md @@ -182,24 +182,20 @@ Other monospaced fonts with ligatures: - [Iosevka](https://be5invis.github.io/Iosevka/) (free) - [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode) (free) -### Building +### Building Fira Code locally -On macOS: +In case you want to alter FiraCode.glyphs and build OTF/TTF/WOFF files yourself, this is setup I use on macOS: +```bash +# install all required build tools +script/bootstrap + +# build the font files +script/build + +# install OTFs to ~/Library/Fonts +script/install ``` -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 -brew tap bramstein/webfonttools -brew install sfnt2woff-zopfli -``` - -Run `./build.sh` ### Credits diff --git a/googlefonts-qa/scripts/build.sh b/googlefonts-qa/scripts/build.sh index fcb4d4e..19fefe6 120000 --- a/googlefonts-qa/scripts/build.sh +++ b/googlefonts-qa/scripts/build.sh @@ -1 +1 @@ -../../build.sh \ No newline at end of file +../../script/build \ No newline at end of file diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 0000000..23e1709 --- /dev/null +++ b/script/bootstrap @@ -0,0 +1,19 @@ +#! /bin/bash -ex + +sudo easy_install pip +pip3 install virtualenv --user +python3 -m virtualenv venv +source venv/bin/activate + +# https://github.com/googlefonts/gftools/issues/121 +brew install pkg-config +pip3 install -U Pillow==5.4.1 idna==2.8 requests==2.21.0 urllib3==1.24.1 +export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" +pip3 install pycairo +pip3 install git+https://github.com/googlefonts/gftools + +pip3 install fontmake +brew install ttfautohint +brew install woff2 +brew tap bramstein/webfonttools +brew install sfnt2woff-zopfli diff --git a/build.sh b/script/build similarity index 99% rename from build.sh rename to script/build index 4e2d9d7..8d31979 100755 --- a/build.sh +++ b/script/build @@ -1,5 +1,5 @@ -#!/bin/bash -set -e +#!/bin/bash -ex + source venv/bin/activate # ============================================================================ diff --git a/script/install b/script/install new file mode 100755 index 0000000..8f3d10b --- /dev/null +++ b/script/install @@ -0,0 +1,3 @@ +#!/bin/bash -ex + +cp distr/otf/*.otf ~/Library/Fonts \ No newline at end of file diff --git a/release.sh b/script/release similarity index 100% rename from release.sh rename to script/release