Improve font embedding for MCUs when bundling translations (#7875)

Include messages from bundled translations into the character set used for deciding which glyphs to embed.
This commit is contained in:
Simon Hausmann 2025-03-18 11:54:28 +01:00 committed by GitHub
parent 14b04678b1
commit cc932fceb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 63 additions and 21 deletions

View file

@ -42,7 +42,7 @@ macro_rules! unwrap_or_continue {
}
/// The full document (a complete file)
#[derive(Default, Debug)]
#[derive(Default)]
pub struct Document {
pub node: Option<syntax_nodes::Document>,
pub inner_components: Vec<Rc<Component>>,
@ -59,6 +59,9 @@ pub struct Document {
pub embedded_file_resources:
RefCell<BTreeMap<SmolStr, crate::embedded_resources::EmbeddedResources>>,
#[cfg(feature = "bundle-translations")]
pub translation_builder: Option<crate::translations::TranslationsBuilder>,
/// The list of used extra types used recursively.
pub used_types: RefCell<UsedSubTypes>,
@ -259,6 +262,8 @@ impl Document {
imports,
exports,
embedded_file_resources: Default::default(),
#[cfg(feature = "bundle-translations")]
translation_builder: None,
used_types: Default::default(),
popup_menu_impl: None,
}