Skip to content

kithara ui shaping

Pavel Litvinenko edited this page Sep 26, 2026 · 1 revision

kithara-ui-shaping

Contract reviewed from PR #445, source revision e07c17b42. This records that branch contract, not merged release status or new runtime validation. API and usage · All crates.

Ownership

This crate turns a string and a text style into positioned glyphs. It owns the embedded font catalog, the choice of face for a family and weight, the fallback faces for scripts the display family does not carry, and the policy on whether the machine's own fonts may answer. It knows no toolkit: a backend paints the GlyphRun it returns, and kithara-ui decides which skin asks for which style.

Dependency Constraints

These are facts about our dependencies. They are the reason for code that would otherwise look arbitrary, and none of them can be read off our own sources.

  • Parley 0.6, Vello 0.6, and the iced outline path share one skrifa 0.37 instance, so positioned glyph data crosses between shaping and rendering. Direct skrifa use outside this crate belongs only to the iced outline adapter in kithara-ui, because Parley does not expose glyph outlines.
  • Fontique 0.6.0 finds no CJK fallback on macOS. fontique-0.6.0/src/backend/coretext.rs asks CoreText for a fallback, gets PingFang SC, then looks that family up in its own scanned name map, which does not contain it; fallback() returns None. A Han or Japanese title therefore shapes to .notdef there. Measured on an Apple/CoreText host over 519 families, Hebrew, Arabic, Korean, Thai, and Devanagari all resolve. Do not select a face ourselves when Fontique declines: that would hide the upstream defect behind a private path.
  • The embedded faces do not cover the same scripts. Inter and JetBrains Mono carry Latin, Cyrillic, and Greek; Space Grotesk is Latin-only. Because the shipped skins spend the Display family on titles, TextResources::new registers Inter as the collection fallback for Cyrillic and Greek. Greek is registered against a measurement, not an assumption, and a test holds it.

Clone this wiki locally