Files
craft-libs/crates/font-manager/build.rs
T
aiongg 5c14a9d042 Font picker: give the Arabic sample story Noto Sans Arabic from the craft fonts set
The story's catalog had no face that maps Arabic, so no row showed the
Arabic sample. craft-font-manager's build script embeds Noto Sans Arabic
with fonts-build's Embed when the suite feature is on and CRAFT_FONTS_DIR
names a craft-fonts checkout; without it the table is empty and the story
shows the other families only.
2026-11-22 15:41:05 +00:00

11 lines
531 B
Rust

fn main() {
println!("cargo::rerun-if-changed=build.rs");
// The Arabic sample story's face from the craft fonts set: only for the stories, and never required, so an app
// build with `CRAFT_FONTS_REQUIRED=1` doesn't fail over it.
let stories = std::env::var_os("CARGO_FEATURE_SUITE").is_some();
let written = craft_fonts_build::Embed::documents(&["Noto Sans Arabic"]).filter(move |_| stories).required(false).write("story_fonts.rs");
if let Err(e) = written {
println!("cargo::error={e}");
}
}