Skip to content

Latest commit

 

History

History

iosevka_font

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Build environment for Iosevka font

Introduction

One of my favorite monospace fonts is Iosevka. A containarized build environment will ensure that you have all of the correct build tools installed without cluttering your system. This guide provides instructions on how to build the Iosevka font in a Docker or podman container. The container targets font version 3. It has not been tested on versions 4 or higher. For these versions, see this fork.

Set up build environment

This section walks you through the creation of a container with the Iosevka font build environment.

Assuming you have Docker or podman installed on your computer, change into the folder containing this repo's Dockerfile and run

# Using docker
docker build [optional build args] -t  iosevka_build . -f Dockerfile

# Using podman
podman build --format docker [optional build args] -t iosevka_build . -f Dockerfile

Note: Do not include [optional build args] when building the actual container unless you know exactly what build arguments you want to use. For a list of build arguments, search for the ARG lines in the Dockerfiles. The build arguments are only used to download specific versions of the build tools.

Build process

For further instructions of the build process, you can refer to the Build Your Own Style section in the Iosevka repo README.

  1. Create a build plan by copying the sample plan in the Iosevka font repo and editing it.
  2. Place the build plan in a subfolder called, for example, build_dir.
  3. Build the font with the command (replace docker with podman if necessary)
    docker run -it -v ./build_dir:/build iosevka_build [optional build args]
    Use the environment variable FONT_VERSION to specify the font version that you want to build. Otherwise the latest font version is built. You can also specify custom build arguments mentioned in Build Your Own Style. For example, to only build the TTF files of version 3.0.1, we would run
    docker run -it -e FONT_VERSION=3.0.1 -v ./build_dir:/build iosevka_build ttf::iosevka-custom
    Notes:
    • If no custom build arguments are provided, the first build plan in private-build-plans.toml is used. Otherwise, you must specify everything you would normally put after npm run build --.
    • Use FONT_VERSION=dev to build the bleeding edge code from the dev branch.
    • The -it option is used so that you can cancel the build by pressing Ctrl+c with your keyboard.
    • The container is not removed automatically so that you can debug the container.
  4. Once the font files are built, they will be placed in a folder called dist inside build_dir.

Try out the fonts

Copy the subfolders inside dist to ~/.local/share/fonts and run fc-cache

Helpful links

My font style

My last build uses the build plan in private-build-plans.toml.