mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-03 05:12:55 +00:00
In the screenshot tests this works by setting SLINT_DEFAULT_FONT to pointer to a directory, instead of a file. We then load all fonts in that directory and consider their families the default unless a family is specified. This way for "Noto Sans" a regular as well as an italic version is registered in fontdb and returned in the list of font fallback ids. embed_glyphs in the compiler then embeds those variants and we find them at run-time. |
||
|---|---|---|
| .. | ||
| build.rs | ||
| Cargo.toml | ||
| demo.slint | ||
| main.rs | ||
| README.md | ||
Slint UEFI demo
This example demonstrates Slint in a UEFI environment.
To build this example a suitable UEFI rust target must be installed first:
rustup target install x86_64-unknown-uefi
To build, simply pass the --package and --target arguments to cargo:
cargo build --package uefi-demo --target x86_64-unknown-uefi
The produced UEFI binary can then either be tested on real hardware by booting it like any other bootloader or directly with QEMU (the firmware location varies by distro):
qemu-system-x86_64 -bios /usr/share/edk2-ovmf/x64/OVMF.fd -kernel target/x86_64-unknown-uefi/debug/uefi-demo.efi
