slint/internal/core
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
..
graphics C++: Fix binary incompatibility with freestanding build 2025-11-17 11:10:40 +01:00
items core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
model Rust adapter model: don't panic over broken model returning None from row_data 2025-08-22 13:27:35 +02:00
properties core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
software_renderer core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
textlayout core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
window Update popup.rs 2025-06-21 08:00:10 +02:00
accessibility.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
animations.rs Add assertions for clocks monotonicity (#9514) 2025-09-24 18:20:48 +02:00
api.rs Virtual Keyboard Handling on iOS (#10020) 2025-11-13 12:41:29 +01:00
callbacks.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
Cargo.toml Gallery Example: Add i18n and dynamic font loading for WASM (#9762) 2025-11-17 14:00:39 +01:00
component_factory.rs ComponentHandle: don't rely on the Inner to be a VRc<ItemTreeVTable> 2025-07-04 10:07:22 +02:00
context.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
date_time.rs Upgrade cbindgen and use unsafe(no_mangle) attributes (#8539) 2025-05-26 11:21:33 +02:00
future.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
graphics.rs Add support for CSS conic-gradient 'from <angle>' syntax (#9830) 2025-11-13 16:05:16 +01:00
input.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
item_focus.rs Janitor: Always use `#![no_std] for runtime lib 2025-01-27 19:22:00 +01:00
item_rendering.rs renderer: Remove the str slice from text_size() 2025-11-07 12:41:52 +00:00
item_tree.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
items.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
layout.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
lengths.rs Safe Area 2025-10-24 12:24:45 +02:00
lib.rs Gallery Example: Add i18n and dynamic font loading for WASM (#9762) 2025-11-17 14:00:39 +01:00
menus.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
model.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
partial_renderer.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
platform.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
properties.rs core: fix edition 2024 warnings with slint_debug_property enabled 2025-11-14 14:10:15 +01:00
README.md Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
renderer.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
rtti.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
sharedvector.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
slice.rs Fix clippy issues, plus a few manual cleanups 2025-02-06 17:28:51 +01:00
software_renderer.rs core: Switch to edition 2024 and just reformat 2025-11-13 15:59:32 +01:00
string.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
tests.rs Upgrade cbindgen and use unsafe(no_mangle) attributes (#8539) 2025-05-26 11:21:33 +02:00
textlayout.rs feature/fontique: switch femtovg to parley (#9466) 2025-09-26 02:48:48 +12:00
timers.rs Timer: Don't panic if starting timers while drop'ing thread_locals 2025-07-11 12:24:44 +02:00
translations.rs core: Fix edition 2024 warnings 2025-11-13 15:59:32 +01:00
unsafe_single_threaded.rs MCU: fix timer not starting if started before first call to update_timers_and_animations 2025-09-08 16:27:12 +02:00
window.rs Core: replace the use of WindowAdapterInternal::as_any with trait inheritance 2025-11-17 10:31:08 +01:00

Slint Runtime Library

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.