kuronuri is maintained by lihbr. ask for help by opening an issue, or request a review by opening a pull request
- node, and pnpm
- python 3.14
glyphs come from four tiers:
- redaction: mckl's glyphs and pixel fonts, as they are, downloaded into
.cache/sources/bypnpm venv - noto serif jp: the kana and kanji, 500 merged into regular and italic and 800 into bold, the weights whose stems match. on 50 to 100, where pixels make them darker, the outlines of the kanji and kana in regular and italic are 400, in the spacing of 500; bold's stay 800.
src/pixel.pypixelates them for the pixelated variants, 10 to 100 - drawn by code: what redaction lacks, drawn from its glyphs in
src/glyphs, a module per group, each explained in its docstring. components keep mckl's pixels, the rest are pixelated where in a cell they fall best - drawn by hand: where code loses mckl's carving or pixels read as another glyph, in
src/glyphs/drawn: outlines in a ufo per style, in redaction's units, and cells incells.txt,arrows.txt,maths.txt,greek.txtandfigures.txt, and the kanji and kana of regular and italic a phase turns into another character or breaks, on 100 (and 上 on 50), injapanese.txt,#ink and.air, top row first.pnpm unitchecks the fonts match them fraction ⅐,
the scripts:
src/draw.pydraws tiers 3 and 4 into redaction, into.cache/drawnsrc/review.pydraws, then writes.tmp/reviewfor/review(pnpm dev): changes since approved, before and after, text set as the build sets it, merged with noto serif jp (a few minutes oncesrc/changes, cached), next to the same text before, and the pixelated japanese in text next to the latin.--approvemakes them the reference, in.cache/approved.--before <dir>copies built fonts to compare with, say a checkout'sdist/ttf, kept with where and when they came from until--beforeis given again: text not approved yet and the japanese are compared with them. glyphs in.tmp/watch.txtget their own tab, its format is inreview.pysrc/score.pyscores drawn glyphs against mckl's (¹ ² ³, ¼ ⅗, ™), and superscript letters against approved, into.tmp/scoresrc/build.pymerges noto serif jp, pixelates it, and writesdist/ttfanddist/woff2.src/web.pyslices them intodist/web, the npm packagetest/check.pychecks every font and slice indist/.--pictureskeeps the cells of the greek letters as they are now (test/greek-cells.json), once looked at: a cell lost or gained failssiteis kuronuri.lihbr.com, a nuxt app usingdist/webthrough the workspace
# clone and prepare the project
git clone git@github.com:lihbr/kuronuri.git
cd kuronuri
pnpm install
# install python dependencies and download source fonts
pnpm venv
# draw the glyphs of src/glyphs for /review
pnpm review
# compare text and the japanese with fonts built before a change
pnpm review --before ../kuronuri/dist/ttf
# approve changes
pnpm review --approve
# build dist/, ~15 min, ~4 once cached
pnpm build
# build only a few fonts
pnpm build --variants 0,35 --styles Regular
# redo only dist/web
pnpm build --web-only
# start kuronuri.lihbr.com on localhost:3000, with /review
pnpm dev
# lint changes
pnpm lint
# format changes
pnpm format
# run unit tests
pnpm unit# bump the version and push a tag, ci publishes to npm and github
pnpm release