├── deb └── debian │ ├── compat │ ├── changelog │ └── control ├── .meta └── header.png ├── .github └── workflows │ └── push_images.yml ├── private-build-plans.toml ├── Dockerfile ├── run.sh ├── README.md └── LICENSE /deb/debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /.meta/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/avivace/iosevka-docker/HEAD/.meta/header.png -------------------------------------------------------------------------------- /deb/debian/changelog: -------------------------------------------------------------------------------- 1 | fonts-iosevka (1.0-1) UNRELEASED; urgency=medium 2 | 3 | * Initial release. 4 | 5 | -- Antonio Vivace Wed, 25 Nov 2020 18:59:28 +0100 6 | -------------------------------------------------------------------------------- /deb/debian/control: -------------------------------------------------------------------------------- 1 | Source: fonts-iosevka 2 | Section: fonts 3 | Priority: optional 4 | Maintainer: Antonio Vivace 5 | Build-Depends: debhelper (>= 11) 6 | Standards-Version: 4.1.3 7 | Homepage: https://typeof.net/Iosevka/ 8 | Vcs-Browser: https://github.com/avivace/fonts-iosevka 9 | Vcs-Git: https://github.com/avivace/fonts-iosevka.git 10 | 11 | Package: fonts-iosevka 12 | Architecture: any 13 | Multi-Arch: foreign 14 | Depends: ${misc:Depends} 15 | Description: Iosevka font family -------------------------------------------------------------------------------- /.github/workflows/push_images.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - "master" 7 | 8 | jobs: 9 | docker: 10 | strategy: 11 | matrix: 12 | include: 13 | - file: Dockerfile 14 | tags: avivace/iosevka-build:latest 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Set up QEMU 18 | uses: docker/setup-qemu-action@v1 19 | - name: Set up Docker Buildx 20 | uses: docker/setup-buildx-action@v1 21 | - name: Login to DockerHub 22 | uses: docker/login-action@v1 23 | with: 24 | username: ${{ secrets.DOCKERHUB_USERNAME }} 25 | password: ${{ secrets.DOCKERHUB_TOKEN }} 26 | - name: Build and push 27 | uses: docker/build-push-action@v2 28 | with: 29 | file: ${{ matrix.file }} 30 | push: true 31 | tags: ${{ matrix.tags }} 32 | -------------------------------------------------------------------------------- /private-build-plans.toml: -------------------------------------------------------------------------------- 1 | [buildPlans.iosevka] 2 | family = "Iosevka" 3 | spacing = "fixed" 4 | serifs = "sans" 5 | 6 | [buildPlans.iosevka-av01] 7 | family = "Iosevka-AV01" 8 | spacing = "fixed" 9 | serifs = "sans" 10 | 11 | [buildPlans.iosevka-av01.variants.design] 12 | turn-v = "curly" 13 | capital-g = "toothless" 14 | capital-i = "short-serifed" 15 | capital-j = "serifed" 16 | percent = "rings-connected" 17 | lig-ltgteq = "slanted" 18 | dollar = "open" 19 | at = "threefold" 20 | ampersand = "upper-open" 21 | number-sign = "upright" 22 | brace = "straight" 23 | caret = "low" 24 | asterisk = "hexlow" 25 | tilde = "low" 26 | 27 | [buildPlans.iosevka-av01.slopes] 28 | upright = "normal" 29 | italic = "italic" 30 | 31 | [buildPlans.iosevka-av01.weights.light] 32 | shape = 300 33 | menu = 300 34 | css = 300 35 | 36 | [buildPlans.iosevka-av01.weights.regular] 37 | shape = 400 38 | menu = 400 39 | css = 400 40 | 41 | [buildPlans.iosevka-av01.weights.medium] 42 | shape = 500 43 | menu = 500 44 | css = 500 45 | 46 | [buildPlans.iosevka-av01.weights.semibold] 47 | shape = 600 48 | menu = 600 49 | css = 600 50 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Original: https://gist.github.com/tasuten/0431d8af3e7b5ad5bc5347ce2d7045d7 2 | # https://github.com/ejuarezg/containers/blob/master/iosevka_font/Dockerfile 3 | 4 | # Run example 5 | # 6 | # docker run \ 7 | # -v ./build:/build \ 8 | # iosevka_build 9 | 10 | FROM debian:buster-slim 11 | 12 | ARG OTFCC_VER=0.10.4 13 | ARG PREMAKE_VER=5.0.0-alpha15 14 | ARG NODE_VER=14 15 | 16 | RUN apt-get update \ 17 | && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ 18 | build-essential \ 19 | jq \ 20 | file \ 21 | curl \ 22 | ca-certificates \ 23 | ttfautohint \ 24 | && curl -sSL https://deb.nodesource.com/setup_${NODE_VER}.x | bash - \ 25 | && apt-get install -y nodejs \ 26 | && cd /tmp \ 27 | && curl -sSLo premake5.tar.gz https://github.com/premake/premake-core/releases/download/v${PREMAKE_VER}/premake-${PREMAKE_VER}-linux.tar.gz \ 28 | && tar xvf premake5.tar.gz \ 29 | && mv premake5 /usr/local/bin/premake5 \ 30 | && rm premake5.tar.gz \ 31 | && curl -sSLo otfcc.tar.gz https://github.com/caryll/otfcc/archive/v${OTFCC_VER}.tar.gz \ 32 | && tar xvf otfcc.tar.gz \ 33 | && mv otfcc-${OTFCC_VER} otfcc \ 34 | && cd /tmp/otfcc \ 35 | && premake5 gmake \ 36 | && cd build/gmake \ 37 | && make config=release_x64 \ 38 | && cd /tmp/otfcc/bin/release-x64 \ 39 | && mv otfccbuild /usr/local/bin/otfccbuild \ 40 | && mv otfccdump /usr/local/bin/otfccdump \ 41 | && cd /tmp \ 42 | && rm -rf otfcc/ otfcc.tar.gz \ 43 | && rm -rf /var/lib/apt/lists/* 44 | 45 | COPY run.sh /run.sh 46 | 47 | WORKDIR /build 48 | ENTRYPOINT ["/bin/bash", "/run.sh"] 49 | 50 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Based on https://github.com/ejuarezg/containers/blob/master/iosevka_font/run.sh 3 | 4 | set -e 5 | 6 | # Create temporary build directory 7 | mkdir -p /tmp/build 8 | cd /tmp/build 9 | 10 | BUILD_FILE="private-build-plans.toml" 11 | BUILD_PARAM="contents::iosevka" 12 | 13 | CUSTOM_BUILD_FILE=false 14 | 15 | # Check the input 16 | if [[ -f "/build/$BUILD_FILE" ]]; then 17 | echo "Found custom build-plans file: $BUILD_FILE" 18 | CUSTOM_BUILD_FILE=true 19 | if [[ -z $1 ]]; then 20 | # Get the name of the first build plan when the user does not provide 21 | # custom build arguments (automatic mode) 22 | PLAN_NAME=$(grep -Po -m 1 '(?<=buildPlans.)[^\]]*' /build/$BUILD_FILE) 23 | BUILD_PARAM="contents::$PLAN_NAME" 24 | else 25 | # User knows what they are doing and provided custom build arguments 26 | # (manual mode) 27 | BUILD_PARAM="$1" 28 | fi 29 | else 30 | echo "Custom build-plans file not found, using the default one" 31 | fi 32 | 33 | echo "Using build plan: $BUILD_PARAM" 34 | 35 | # Find the latest font version if the font version environment variable is not 36 | # set. The `-n` operator checks if the length of the string is nonzero. 37 | if [[ -z "$FONT_VERSION" ]]; then 38 | FONT_VERSION=$(curl 'https://api.github.com/repos/be5invis/Iosevka/releases?per_page=1' \ 39 | | jq -r '.[0].tag_name' \ 40 | | grep -oP '(?<=^v)([0-9]+\.)*[0-9]+$' ) 41 | fi 42 | 43 | echo "Using font version: ${FONT_VERSION}" 44 | 45 | echo "Downloading and checking the validity of the source code..." 46 | 47 | # Download source code 48 | if [ "$FONT_VERSION" == "dev" ]; then 49 | curl -sSLo vdev.tar.gz --proto '=https' --tlsv1.2 https://github.com/be5invis/Iosevka/tarball/dev 50 | else 51 | curl -sSLO --proto '=https' --tlsv1.2 https://github.com/be5invis/Iosevka/archive/v${FONT_VERSION}.tar.gz 52 | fi 53 | 54 | # Check for valid downloaded file (build can fail here with exit code 1) 55 | file "v${FONT_VERSION}.tar.gz" | grep 'gzip compressed data' > /dev/null 56 | 57 | # Extract downloaded source code 58 | tar -xf "v${FONT_VERSION}.tar.gz" 59 | cd ./*Iosevka-* 60 | 61 | if [ "$CUSTOM_BUILD_FILE" = true ]; then 62 | cp "/build/$BUILD_FILE" . 63 | fi 64 | 65 | echo "Building version ${FONT_VERSION}" 66 | npm install 67 | npm run build -- "$BUILD_PARAM" 68 | 69 | # Copy the dist folder back to the mounted volume 70 | cp -r dist /build/ 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iosevka-docker 2 | 3 | [![Docker Pulls](https://img.shields.io/docker/pulls/avivace/iosevka-build?style=flat-square)](https://hub.docker.com/r/avivace/iosevka-build) 4 | 5 | Docker containers to build your own (or standard) version of the [Iosevka](https://github.com/be5invis/Iosevka) typeface without worrying about dependencies and build environments. 6 | 7 | ## Quickstart 8 | 9 | Linux: 10 | ```bash 11 | docker run -it -v $(pwd):/build avivace/iosevka-build 12 | ``` 13 | 14 | Windows (Command Prompt) 15 | ```bash 16 | docker run -it -v %cd%:/build avivace/iosevka-build 17 | ``` 18 | 19 | Windows (PowerShell) 20 | ```bash 21 | docker run -it -v ${PWD}:/build avivace/iosevka-build 22 | ``` 23 | 24 | _For the rest of this document, replace `$(pwd)` with either `%cd%` or `${PWD}` based on your environment_ 25 | 26 | Will build the [latest](https://github.com/be5invis/Iosevka/releases/tag/v4.0.0) released version of Iosevka with the default configuration. 27 | 28 | Your built font files will be available in the `dist/` folder. 29 | 30 | ### Custom build configuration 31 | 32 | To customize your build, just launch the docker command from the directory where your `private-build-plans.toml` is placed. 33 | 34 | You can prepare your configuration following the [Customized Build](https://github.com/be5invis/Iosevka#customized-build) documentation or use the [Iosevka Build Customizer](https://typeof.net/Iosevka/customizer). 35 | 36 | > Be aware of the breaking changes introduced with 4.0.0 i.e. configurations working with `3.7.1` are not guaranteed to work with `4.0.0`. 37 | 38 | ### Version 39 | 40 | To specify a version to build, just add `-e FONT_VERSION=` to the Docker command. E.g. to build version `3.7.1`: 41 | 42 | ``` 43 | docker run -e FONT_VERSION=3.7.1 -it -v $(pwd):/build avivace/iosevka-build 44 | ``` 45 | Releases can be found [here](https://github.com/be5invis/Iosevka/releases). Only font versions 3.0.0 or higher are supported. 46 | 47 | ### Build arguments 48 | 49 | You can pass any of the optional build options described in [Customized Build](https://github.com/be5invis/Iosevka#customized-build). 50 | 51 | ``` 52 | docker run -it -v $(pwd):/build avivace/iosevka-build [optional build args] 53 | ``` 54 | 55 | E.g. to only build TTF files: 56 | 57 | ```bash 58 | docker run -it -v $(pwd):/build avivace/iosevka-build ttf::iosevka-custom 59 | ``` 60 | 61 | ## Build the Docker image yourself 62 | 63 | 1. Be sure to have Docker installed. Clone this repository. 64 | 65 | ```bash 66 | git clone https://github.com/avivace/fonts-iosevka.git 67 | ``` 68 | 69 | 2. If you want, replace the provided `private-build-plans.toml` file with yours. 70 | 71 | 3. Build and run the Docker container 72 | 73 | ```bash 74 | # Build the container 75 | docker build -t iosevka_build . -f Dockerfile 76 | 77 | # Launch the build on Iosevka git tag 3.7.1, using the build folder on the host 78 | docker run -e FONT_VERSION=3.7.1 -it -v $(pwd)/build:/build iosevka_build 79 | ``` 80 | 81 | 4. Done! Your built font files are available in the `dist` folder. 82 | 83 | ## Install 84 | 85 | Copy the generated folders in `~/.local/share/fonts` and run `fc-cache`. 86 | 87 | ```bash 88 | cp -r build/dist/* ~/.local/share/fonts/ 89 | fc-cache 90 | ``` 91 | 92 | ## Debian packaging 93 | 94 | TODO 95 | 96 | ## References and links 97 | 98 | - https://git.mmk2410.org/deb/fonts-iosevka 99 | - https://github.com/ejuarezg/containers/tree/master/iosevka_font#container-method 100 | - https://github.com/be5invis/Iosevka 101 | - [Original Dockerfile](https://gist.github.com/tasuten/0431d8af3e7b5ad5bc5347ce2d7045d7) 102 | - https://github.com/nodesource/distributions/blob/master/README.md 103 | - https://premake.github.io/download.html#v5 104 | - https://stackoverflow.com/questions/6482377/check-existence-of-input-argument-in-a-bash-shell-script 105 | - https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8 106 | - https://stackoverflow.com/questions/1247812/how-to-use-grep-to-get-anything-just-after-name 107 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | 123 | --------------------------------------------------------------------------------