mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
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.
11 lines
531 B
Rust
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}");
|
|
}
|
|
}
|