pub fn join_charsets(charsets: &[&str]) -> StringExpand description
Merges multiple charset strings into a single, deduplicated, and sorted string.
This function provides an enterprise-quality, build-system agnostic solution for
aggregating characters for font subsetting. By combining the CHARSET constants
generated natively by fluent-zero-build from your application and all its
dependencies, you seamlessly compute a master charset without brittle cargo_metadata
scripts or violating Cargo’s OUT_DIR sandboxing limits.
§Arguments
charsets- A slice of&strreferences, typically pointing tocrate::CHARSET.
§Returns
A deterministically sorted String containing every unique character.
§Example
ⓘ
let complete_charset = fluent_zero::join_charsets(&[
crate::CHARSET,
my_ui_lib::CHARSET,
]);
std::fs::write("target/font_charset.txt", complete_charset).unwrap();