Optional CJK .cpfont files for CrossPoint Reader.
Start here: read the font contribution guide.
The short version:
- Fork the repository. Keep each font PR to one family.
- Put one TTF, OTF, or ZIP file under
community-fonts/<FamilyId>/. - Add its names, languages, category, and file path to
config/fonts.yaml. A font homepage or source repository URL is optional. - Open a pull request. GitHub pre-fills the checklist, or you can choose the Font submission template.
The contribution guide has the field table and full examples. Do not commit generated .cpfont files, dist/, caches, executables, or Git LFS objects.
The current catalog contains 16 families for Simplified Chinese, Traditional Chinese, and Japanese. Pages shows each family's original/localized name for the selected UI language and keeps the stable ASCII build ID below it; search accepts either form. Catalog metadata can classify a family as reader (the default) or ui.
- UI families are presented as UI font families instead of exposing separate 8/10/12 pt download buttons.
- Reader families expose their configured reader sizes while keeping the fixed 8/10/12 pt UI fallback files out of the download-button list.
- The standard catalog build still emits 8/10/12 pt for CJK UI fallback and 14/16/18/22 pt for reader text.
- 14/16/18/22 pt map to the reader's four persisted size slots and show roughly 16/14/12/10 full-width CJK characters per line at the default portrait margin.
- The firmware selects an installed physical file; it never scales a CJK font on the device.
For private font conversion, CrossPoint CJK Font Maker produces a single .cpfontpkg family package. The package keeps one .cpfont v4 file per physical size, always includes UI sizes 8/10/12 pt, and accepts a custom positive-integer reader-size list (default 14/16/18/22 pt).
See SOURCES.md for the source links recorded for each family.
Requirements:
- Python 3.11
- FreeType development/runtime libraries
python -m pip install -r requirements.txt
python scripts/validate_config.py
python scripts/fetch_fallback.py
python scripts/build_fonts.py --clean
python scripts/verify_release.py distFor a quick smoke test:
python scripts/build_fonts.py --clean --only NotoSansSCSelf-builders can emit only the sizes their device needs instead of the full catalog contract:
python scripts/build_fonts.py --clean --only NotoSansSC --sizes 12,14,18,22Generated files are written under dist/ and are ignored by Git.
The Pages generator needs the published manifest and only the three preview sizes for each family:
mkdir -p release-assets .cache/pages-fonts
python -c "import urllib.request; urllib.request.urlretrieve('https://github.com/aBER0724/crosspoint-cjk-fonts/releases/download/sd-fonts-m2-b4/fonts.json', 'release-assets/fonts.json')"
python scripts/fetch_release_previews.py \
--manifest release-assets/fonts.json \
--output .cache/pages-fonts \
--sizes 14,18,22
python scripts/build_pages.py \
--manifest release-assets/fonts.json \
--fonts .cache/pages-fonts \
--output site-distOpen site-dist/index.html through a local static HTTP server. The generated catalog.json is web schema 1 and records .cpfont version 4 plus Release manifest version 2.
- Build font catalog validates configuration, Python code, uploaded font paths, the
.cpfont v4parser, preview renderer, Pages projection, and workflows on relevant pull requests andmainpushes. Manual runs may select one family (smoke_family), override the physical sizes (sizes, comma-separated), and choose amode(manual/self/contribute) for a self-built catalog, a personal Release, or an upstream submission. - Publish font release runs after relevant changes reach
main, builds new or changed families, reuses unchanged published files, verifies the complete asset inventory, and updates the fixedsd-fonts-m2-b4Release. - Deploy font catalog generates the 14/18/22 pt PNG previews and deploys the Pages catalog after a successful font release.
To build a catalog from the Actions UI:
- Open the Actions tab and select the Build font catalog workflow.
- Click Run workflow.
- Fill in the inputs below, then click Run workflow again.
| Input | Default | Effect |
|---|---|---|
smoke_family |
empty | Build only this one family for a fast smoke run; empty builds every family. |
sizes |
empty | Comma-separated physical sizes to emit, e.g. 12,14,18; empty uses the seven catalog sizes from config/fonts.yaml. |
mode |
manual |
manual builds only (no publishing); self also publishes this repo's sd-fonts-m2-b4 Release; contribute validates, then pushes a submit branch for a PR to upstream. |
A malformed sizes value (empty list, non-integer, zero, or negative) fails the run before any font is built.
Runs on your own fork, the built catalog is published to your sd-fonts-m2-b4 Release and the manifest baseUrl points at your repository:
- Fork this repository and push your font sources under
community-fonts/<FamilyId>/on the default branch. - Run Build font catalog with
mode: self(optionallysmoke_familyandsizes). - When the run finishes, the Release at
https://github.com/<your-owner>/<your-repo>/releases/tag/sd-fonts-m2-b4holdsfonts.jsonplus every.cpfont. - On the device, set the font repository to
<your-owner>/<your-repo>(empty keeps the upstream default) and download fonts.
Repeat runs update the same Release assets (--clobber), so your device URL never changes.
GitHub's GITHUB_TOKEN cannot open a cross-repo PR from a fork, so the flow is semi-automatic: the run validates and builds your font, pushes a submit/<FamilyId> branch to your fork, then prints a link you click to open the PR draft:
- Fork this repository and push your font sources under
community-fonts/<FamilyId>/on the default branch. - Run Build font catalog with
mode: contribute(usesmoke_family: <FamilyId>to validate just your font). - After the run, open the Summary tab and click the printed compare link to create a PR draft to upstream. Follow
CONTRIBUTING.md.
Stable device endpoints:
https://github.com/aBER0724/crosspoint-cjk-fonts/releases/download/sd-fonts-m2-b4/fonts.json
https://github.com/aBER0724/crosspoint-cjk-fonts/releases/download/sd-fonts-m2-b4/<Family>_<size>.cpfont
Uploaded TTF, OTF, and ZIP source files belong under community-fonts/<FamilyId>/. Do not commit generated .cpfont files, dist/, caches, fonts.json, or site-dist/.