slint-ui/slint · error
No font fallback found. The software renderer requires enabl
Error message
No font fallback found. The software renderer requires enabling the `EmbedForSoftwareRenderer` option when compiling slint files.
What it means
Error "No font fallback found. The software renderer requires enabling the `EmbedForSoftwareRenderer` option when compiling slint files." thrown in slint-ui/slint.
Source
Thrown at internal/renderers/software/fonts.rs:193
fonts
.iter()
.cloned()
.filter(|bitmap_font| bitmap_font.italic == request.italic)
.min_by_key(|bitmap_font| bitmap_font.weight.abs_diff(requested_weight))
.or_else(|| fonts.first().cloned())
}) {
fallback_bitmap_font
} else {
#[cfg(feature = "systemfonts")]
return systemfonts::fallbackfont(
request,
scale_factor,
&mut font_context.collection,
&mut font_context.source_cache,
)
.into();
#[cfg(not(feature = "systemfonts"))]
panic!(
"No font fallback found. The software renderer requires enabling the `EmbedForSoftwareRenderer` option when compiling slint files."
)
}
}
};
let requested_pixel_size: PhysicalLength =
(request.pixel_size.unwrap_or(DEFAULT_FONT_SIZE).cast() * scale_factor).cast();
let nearest_pixel_size = font
.glyphs
.partition_point(|glyphs| pixel_size(glyphs) <= requested_pixel_size)
.saturating_sub(1);
let matching_glyphs = &font.glyphs[nearest_pixel_size];
let pixel_size = if font.sdf { requested_pixel_size } else { pixel_size(matching_glyphs) };
pixelfont::PixelFont { bitmap_font: font, glyphs: matching_glyphs, pixel_size }.into()View on GitHub (pinned to 3fd8f2ec03)
Solutions
- Compile the .slint files with the EmbedForSoftwareRenderer option so fonts are embedded.
- Install a fallback font discoverable by the software renderer.
When it happens
Trigger: Thrown at internal/renderers/software/fonts.rs:193 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slint-ui/slint@3fd8f2ec03 (2026-08-19).
Data as JSON: /api/errors/45c4eaee1cb4b28f.
Report an issue: GitHub.