feat(web): unify fonts and refine viewcube

Preload one language-aware font resource across the interface, drawing text, and navigation labels.\n\nRender the navigation cube, ring, outlines, and labels through a 4x MSAA target.
This commit is contained in:
Hakan Seven 2026-08-03 15:28:51 +03:00
commit 53cf31f33d
26 changed files with 1337 additions and 522 deletions

View file

@ -122,6 +122,7 @@ fn load_language(
if requested.is_empty() {
requested.push(loader.fallback_language().clone());
}
#[allow(unused_variables)]
let selected = i18n_embed::select(loader, &Localizations, &requested)?;
#[cfg(target_arch = "wasm32")]
if let Some(language) = selected.first() {
@ -155,6 +156,16 @@ pub fn set_language(language: Language) -> Result<(), i18n_embed::I18nEmbedError
load_language(loader(), language)
}
#[cfg(target_arch = "wasm32")]
pub fn active_language_tag() -> String {
loader()
.current_languages()
.into_iter()
.next()
.unwrap_or_else(|| loader().fallback_language().clone())
.to_string()
}
/// Translate an application-facing source label from the complete UI catalog.
///
/// Stable semantic ids remain preferable for new code. This compatibility