slint/internal/common
Tasuku Suzuki 224a06af57
Gallery Example: Add i18n and dynamic font loading for WASM (#9762)
- Bundle translations for WASM/Android only (not for native builds)
- Load Noto Sans CJK fonts dynamically from GitHub at runtime
- Implement register_font_from_memory() with Result<FontHandle, RegisterFontError>
- Make API automatically available with std feature (no explicit feature flag needed)
- Export load_font_from_bytes() for WASM font loading from JavaScript
- Change from wasm_bindgen(start) to explicit main() call for better control

Fonts are loaded before app initialization to ensure proper CJK text
rendering across all major browsers without bundling font files.

Native builds load translations from lang/ directory at runtime.
WASM/Android builds bundle translations at compile time and detect
browser/system language automatically.

API is now available when std feature is enabled, since we always
have fontique with std. No need for experimental-register-font feature.
2025-11-17 14:00:39 +01:00
..
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
sharedfontique feature/fontique: Remove fontdb, adapt glyph embedding code (#9434) 2025-09-24 16:54:09 +02:00
builtin_structs.rs Add Touch events in WindowEvent (#9858) 2025-10-28 10:11:27 +01:00
Cargo.toml common: switch to 2024 2025-11-13 15:59:32 +01:00
color_parsing.rs Move named color & color literal parsing to slint common (#9981) 2025-11-10 08:39:28 +00:00
enums.rs Add stroke-line-join for Path (#9912) 2025-11-03 10:25:04 +01:00
key_codes.rs Add support for the Back key on Android (#9172) 2025-08-21 22:08:46 +02:00
lib.rs common: switch to 2024 2025-11-13 15:59:32 +01:00
README.md Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
sharedfontique.rs Gallery Example: Add i18n and dynamic font loading for WASM (#9762) 2025-11-17 14:00:39 +01:00

This crate contains internal data structures and code that is shared between the i-slint-core and the i-slint-compiler crates.

NOTE: This library is an internal crate of the Slint project. This crate should not be used directly by applications using Slint. You should use the slint crate instead.

WARNING: This crate does not follow the semver convention for versioning and can only be used with version = "=x.y.z" in Cargo.toml.