Ghostty can be built with -Dfont-backend=freetype, which uses FreeType without any font discovery. The Rust port only had fontconfig+freetype (default on Linux) and the CoreText variants. The new cargo feature `font-backend-freetype` on ghostty-font (forwarded by ghostty-cli and the root crate; non-Apple, non-wasm targets) behaves like Zig's mode: font-family discovery, fallback search and codepoint-map overrides are skipped (embedded fonts only); +list-fonts and +show-face print Zig's "built without a font discovery mechanism" message and exit 1; +version reports `.freetype`. The default backend is unchanged. Also registers the Rust-only benchmark tooling extensions (--time, --handler=full, ghostty-synthetic +sgr) in DEVIANT_FIXES.md. Note: `--all-features` now selects this backend for the workspace. Test Plan: - cargo test -p ghostty-font --features font-backend-freetype (198) - cargo build --features font-backend-freetype && ghostty +list-fonts
24 lines
477 B
Rust
24 lines
477 B
Rust
//! Text shapers. Port of `font/shaper/`.
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub mod cache;
|
|
#[cfg(font_coretext_shaper)]
|
|
mod cf_release;
|
|
#[cfg(font_coretext_shaper)]
|
|
pub mod coretext;
|
|
pub mod coretext_cells;
|
|
pub mod feature;
|
|
#[cfg(font_harfbuzz)]
|
|
pub mod harfbuzz;
|
|
#[cfg(font_harfbuzz)]
|
|
mod hb;
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub mod noop;
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub mod run;
|
|
|
|
pub mod web_canvas;
|
|
|
|
#[cfg(all(test, font_harfbuzz))]
|
|
pub(crate) mod test_util;
|