name: Build fonts on: push: branches: [main] tags: ["*"] jobs: build: runs-on: ubuntu-latest container: image: ghcr.io/nicoverbruggen/fntbld-oci:latest steps: - uses: actions/checkout@v4 - name: Build fonts run: python3 build.py - name: Download kobofix.py run: curl -sL https://raw.githubusercontent.com/nicoverbruggen/kobo-font-fix/main/kobofix.py -o kobofix.py - name: Generate Kobo (KF) fonts run: | python3 kobofix.py --preset kf out/ttf/*.ttf mkdir -p out/kf mv out/ttf/KF_*.ttf out/kf/ - name: Upload artifact uses: actions/upload-artifact@v4 with: name: Readerly path: out/ttf/*.ttf - name: Upload Kobo artifact uses: actions/upload-artifact@v4 with: name: KF_Readerly path: out/kf/*.ttf - name: Zip TTFs for release if: startsWith(github.ref, 'refs/tags/') run: | cd out/ttf && zip -j ../../Readerly.zip *.ttf cd ../../out/kf && zip -j ../../KF_Readerly.zip *.ttf - name: Upload release zips if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-artifact@v4 with: name: Readerly-release path: | Readerly.zip KF_Readerly.zip release: needs: build if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/download-artifact@v4 with: name: Readerly-release - name: Create release uses: softprops/action-gh-release@v2 with: draft: false name: ${{ github.ref_name }} body: | > [!TIP] > **If you are using a Kobo device and reading books purchased from the Kobo Store or reading `kepub` files converted via Calibre**, you should download KF_Readerly.zip, which has fonts slightly altered for optimal kerning for the `kepub` renderer. ### Learn more Readerly is part of the `ebook-fonts` collection. For more information about those fonts, screenshots and how to install them, please consult the [README](https://github.com/nicoverbruggen/ebook-fonts/blob/main/README.md). The FAQ also includes an entry on how to enable ligatures on Kobo devices, which is highly recommended. files: | Readerly.zip KF_Readerly.zip