Commit Graph
19 Commits
Author SHA1 Message Date
Dylan M. Taylor 5ebe40409f fonts-build: publish licences as .txt, refuse line breaks in watched paths, bound manifest and font reads (#837)
Ports vectorcraft 16d7fed6 (licence served as text), lightcraft 0e3b3ed5 (line break in rerun-if-changed) and 9cb2c721 / cadcraft #2732 27b4d723 (bounded regular-file reads).
2026-11-11 15:47:59 -05:00
Dylan M. Taylor 299112d789 Merge pull request #528 from storytold/fix/sec-fonts-build-paths
fonts-build: keep manifest font and licence paths inside the checkout
2026-11-02 22:29:12 -05:00
Dylan M. Taylor 0329fe14de Merge pull request #527 from storytold/fix/sec-fonts-build-cmap
fonts-build: read each shared cmap subtable once
2026-11-02 22:29:09 -05:00
Dylan M. Taylor 9a20fdbe1d Merge pull request #267 from fluorine/fix/fonts-build-ui-paths
Fix native path assertion in font embedding test
2026-11-02 22:24:39 -05:00
Dylan M. Taylor 894340e098 fonts-build: check licence and embedded_elsewhere symlinks against the checkout, refuse symlinks in the served directory 2026-11-02 20:40:37 -05:00
Dylan M. Taylor 9d2d4f1cd9 fonts-build: test that duplicate cmap records don't use up the subtable cap 2026-11-02 20:31:13 -05:00
Dylan M. Taylor c2f94a6aa2 fonts-build: read each shared cmap subtable once
A cmap can list 65535 encoding records that all name the same subtable,
and Cmap::ranges expanded that subtable's spans once per record before
merging them. Records naming a subtable already read are now skipped,
and at most 16 distinct Unicode subtables are read from one face.
2026-11-02 20:11:11 -05:00
Dylan M. Taylor 62df3ef5cb fonts-build: keep manifest font and licence paths inside the checkout
A manifest file or licence_file that is absolute, climbs out with .., or
resolves through a symlink to a file outside the checkout is now an
Error::OutsideCheckout instead of being embedded with include_bytes! or
copied (and written) outside the directory given to Embed::serve.
2026-11-02 19:58:30 -05:00
aiongg 4617a971ae craft-ui, craft-fonts-build: harness direction, caret clamp, served-face conversion, byte-equal font copies 2026-10-25 19:40:45 +00:00
aiongg 3c574ddc61 craft-ui: interface fonts, text direction, IME composer, localized widgets and screen testing
craft-fonts-build gains Embed::serve (served faces for web builds) and the coverage module that craft-ui's fonts use.
2026-10-25 19:08:59 +00:00
Fluorine 8dbbb902fd Fix native path assertion in font embedding test 2026-10-24 02:56:47 -04:00
aiongg 1477ffff09 craft-fonts-build: warn instead of cutting to kana when subset_to gets no catalogs, and when the manifest has no interface face; watch the manifest only after reading it 2026-10-23 05:40:04 +00:00
aiongg a30ff6bf2f craft-fonts-build: reject faces under a non-UTF-8 path instead of embedding a lossy include_bytes! path 2026-10-23 05:05:13 +00:00
aiongg d413913b6b craft-fonts-build: bound each cmap subtable to its declared length 2026-10-23 05:05:13 +00:00
aiongg 971127f61f craft-fonts-build: document fonts are a named list (Embed::documents); Embed::new leaves out the interface faces' sources
Embed::documents embeds only the families an app names, whole, and an
unknown name is Error::UnknownFamilies listing the manifest's families.
Embed::embedded_elsewhere lets check_text and the catalog check count
faces another table embeds. EmbeddedFace::is_cjk. The embed() shorthand,
which embedded every face, is gone.
2026-10-21 17:53:15 +00:00
aiongg a414736c67 craft-fonts-build: subset_to cuts the role ui faces to the catalogs' characters at build time
The interface faces in craft-fonts are full Regular TrueType sources. With the
subset feature (build-dependencies only), Embed::subset_to cuts each one with
skera to the catalogs' characters from U+2E80 up plus CJK punctuation, kana and
full-width forms, keeping every layout feature, and embeds the cut from OUT_DIR.
for_ui without catalogs leaves the interface faces out with a warning; a CFF
interface face is an error. check_text and the catalogs warn only about
characters no embedded face covers.
2026-10-21 13:31:26 +00:00
aiongg 1a8573d523 craft-fonts-build: for_ui embeds CJK faces as their UI subsets; check_text warns about characters no face covers
The manifest's optional ninth field, role, marks the UI subsets (ui). check_text reads
the selected faces' cmaps (formats 4 and 12) with a small reader, so the crate keeps
no dependencies.
2026-10-21 12:45:51 +00:00
aiongg ed0f6f611c craft-fonts-build: CRAFT_FONTS_REQUIRED applies only when it is exactly 1 2026-10-21 06:18:24 +00:00
aiongg b37040cb93 Add craft-fonts-build: embed craft-fonts faces from an app's build.rs 2026-10-21 06:16:08 +00:00