mirror of
https://github.com/hanzoai/font.git
synced 2026-11-02 23:42:52 +00:00
A typeface under the SIL Open Font License, taken up here and carried on. This commit is the tree as it stood when that started; the licence and the copyright notice it requires travel in LICENSE.txt and in every binary's name table, which is where a licence belongs. What follows is the work done since.
2.2 KiB
2.2 KiB
Contributing to Zen Font
Development
Prerequisites
- Python 3.10
- Node.js (supported version in
.nvmrc, prefer using fnm for installing) - pnpm (via corepack)
Building Fonts
make build
This will:
- Build font files from source into
fonts/ - Copy and rename fonts for the npm package into
packages/next/dist/fonts/ - Create
zen-font.zipwith all of the fonts neatly packaged together
Release Process
This project uses Changesets to manage versioning and releases. When changes are merged to main, CI will automatically handle npm publishing and GitHub releases.
Adding a Changeset
When making changes that should be released, add a changeset:
cd packages/next
# If you haven't installed dependencies already:
pnpm install
pnpm changeset
You'll be prompted to:
- Select the type of change (
patch,minor, ormajor- read more about SemVer at semver.org) - Write a summary of the changes
This creates a markdown file in packages/next/.changeset/ describing your change.
Version Guidelines
- patch: Bug fixes, font corrections, minor adjustments
- minor: New font weights, new features, backward-compatible additions
- major: Breaking changes to the npm package's API or major font structure changes
How Releases Work
- On every push: The CI builds fonts and runs tests
- On push to
main:- If there are changeset files, the CI creates a PR titled "changesets: update versions of packages for release"
- When that PR is merged, the CI publishes to npm (named zen) and creates a GitHub release
- An additional step attaches a zip file containing only the relevant font files to the GitHub release
Manual Steps
- Create a PR with your changes and a changeset file
- Get the PR reviewed and merged to
main - A PR titled "changesets: update versions of packages for release" will automatically be raised — review and merge it
- Upon merging the PR, CI will automatically publish to npm and create the GitHub release