forked from 1b-agent/opencadstudio-upstream
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:
1 parent
8dc642d40c
commit
53cf31f33d
26 files changed
+1337
-522
No files matched your search
+11
@@ -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
|
||||
|
||||
Reference in new issue
Block a user