Stabilize the sdf-fonts feature

Enable the SDF feature by default in our compiler binaries

(Still disabled by default for other users because it takes up compile
time for something they probably don't need)
This commit is contained in:
Olivier Goffart 2025-02-19 21:24:53 +01:00 committed by GitHub
parent 28f83c64e2
commit 1e814c9bdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 68 additions and 15 deletions

View file

@ -95,6 +95,9 @@ pub struct CompilerConfiguration {
/// Indicate whether to embed resources such as images in the generated output or whether
/// to retain references to the resources on the file system.
pub embed_resources: EmbedResourcesKind,
/// Whether to use SDF when pre-rendering fonts.
#[cfg(all(feature = "software-renderer", feature = "sdf-fonts"))]
pub use_sdf_fonts: bool,
/// The compiler will look in these paths for components used in the file to compile.
pub include_paths: Vec<std::path::PathBuf>,
/// The compiler will look in these paths for library imports.
@ -224,6 +227,8 @@ impl CompilerConfiguration {
components_to_generate: ComponentSelection::ExportedWindows,
#[cfg(feature = "software-renderer")]
font_cache: Default::default(),
#[cfg(all(feature = "software-renderer", feature = "sdf-fonts"))]
use_sdf_fonts: false,
#[cfg(feature = "bundle-translations")]
translation_path_bundle: std::env::var("SLINT_BUNDLE_TRANSLATIONS")
.ok()