Skip to content

Add Optional Parley Text Engine#931

Draft
CryZe wants to merge 2 commits into
LiveSplit:masterfrom
CryZe:parley-text-engine
Draft

Add Optional Parley Text Engine#931
CryZe wants to merge 2 commits into
LiveSplit:masterfrom
CryZe:parley-text-engine

Conversation

@CryZe

@CryZe CryZe commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

This adds Parley as an optional path based text engine alongside the
existing cosmic-text implementation. It can be selected with the
parley-text-engine feature, including together with
software-rendering or svg-rendering, while cosmic-text remains the
default for existing users.

Parley handles font matching, fallback, shaping, bidirectional text, and
glyph positioning, while Skrifa extracts the resulting glyph outlines.
The implementation preserves the existing renderer-facing font and
label API, including ellipsis truncation, tabular number features,
monospaced digit emulation, variable font coordinates, and glyph path
caching.

This also supports COLR version 0 color fonts by expanding CPAL-colored
layers into the ordered paths understood by the software and SVG
renderers. Rendering tests have separate expected hashes for Parley
where its shaping, fallback, or path generation differs from
cosmic-text.

Draft Status

This is currently a draft because Parley / Fontique has a known system
font fallback problem on Windows, tracked in
linebender/parley#644.

Fontique currently asks DirectWrite for a single fallback family for a
script and locale by probing a representative script sample. For Han,
the sample is , which causes DirectWrite to select Yu Gothic UI on
the affected system. Fontique then caches that as the only Han fallback
family. Yu Gothic UI contains and , but not simplified ,
even though another installed family such as Microsoft YaHei UI
contains all three. As a result, Parley renders as the missing-glyph
symbol.

The implementation remains opt-in until fallback selection can consider
the actual text or expose enough ordered fallback families for Parley's
coverage checks to select a suitable font.

Validation

  • cargo check --no-default-features --features parley-text-engine
  • cargo test --no-default-features --features std,software-rendering,parley-text-engine --test rendering
  • cargo test --no-default-features --features std,svg-rendering,parley-text-engine --test rendering
  • cargo check --all-features
  • cargo clippy --no-default-features --features std,localization,software-rendering,parley-text-engine --lib -- -D warnings

This adds Parley as an optional path based text engine alongside the
existing cosmic-text implementation. It can be selected with the
`parley-text-engine` feature, including together with
`software-rendering` or `svg-rendering`, while cosmic-text remains the
default for existing users.

Parley handles font matching, fallback, shaping, bidirectional text, and
glyph positioning, while Skrifa extracts the resulting glyph outlines.
The implementation preserves the existing renderer-facing font and
label API, including ellipsis truncation, tabular number features,
monospaced digit emulation, variable font coordinates, and glyph path
caching.

This also supports COLR version 0 color fonts by expanding CPAL-colored
layers into the ordered paths understood by the software and SVG
renderers. Rendering tests have separate expected hashes for Parley
where its shaping, fallback, or path generation differs from
cosmic-text.
@CryZe CryZe added enhancement An improvement for livesplit-core. rendering The issue or pull request is affecting the rendering. feature A new user visible feature for livesplit-core. text engine This is about the text engine implementation. blocked Progress is blocked and can't progress. labels Jun 22, 2026
Enable the Fontique fontconfig-dlopen feature whenever the optional Parley text engine is selected. This keeps Linux system font discovery available without requiring the Fontconfig development package or its pkg-config metadata at build time.

The all-features Clippy and benchmark jobs previously failed in yeslogic-fontconfig-sys before compiling LiveSplit because the GitHub runner does not provide fontconfig.pc. Runtime loading matches the intended portable Fontique configuration and leaves the Windows and Apple system font backends unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Progress is blocked and can't progress. enhancement An improvement for livesplit-core. feature A new user visible feature for livesplit-core. rendering The issue or pull request is affecting the rendering. text engine This is about the text engine implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant