slint-ui/slint · error

more than 65535 glyphs are not supported

Error message

more than 65535 glyphs are not supported

What it means

Error "more than 65535 glyphs are not supported" thrown in slint-ui/slint.

Source

Thrown at internal/compiler/passes/embed_glyphs.rs:400

    fallback_fonts: &[Font],
    _compiler_config: &CompilerConfiguration,
    normalized_coords: &[skrifa::instance::NormalizedCoord],
    _variations: &[(skrifa::Tag, f32)],
    override_weight: Option<u16>,
) -> BitmapFont {
    let coords_i16: Vec<i16> = normalized_coords.iter().map(|c| c.to_bits()).collect();

    let mut character_map: Vec<CharacterMapEntry> = character_coverage
        .filter(|code_point| {
            core::iter::once(&font)
                .chain(fallback_fonts.iter())
                .any(|font| swash_font_ref(font).charmap().map(*code_point) != 0)
        })
        .enumerate()
        .map(|(glyph_index, code_point)| CharacterMapEntry {
            code_point,
            glyph_index: u16::try_from(glyph_index)
                .expect("more than 65535 glyphs are not supported"),
        })
        .collect();

    #[cfg(feature = "sdf-fonts")]
    let glyphs = if _compiler_config.use_sdf_fonts {
        embed_sdf_glyphs(pixel_sizes, &character_map, &font, fallback_fonts, _variations)
    } else {
        embed_alpha_map_glyphs(pixel_sizes, &character_map, &font, fallback_fonts, &coords_i16)
    };
    #[cfg(not(feature = "sdf-fonts"))]
    let glyphs =
        embed_alpha_map_glyphs(pixel_sizes, &character_map, &font, fallback_fonts, &coords_i16);

    character_map.sort_by_key(|entry| entry.code_point);

    let font_ref = skrifa::FontRef::from_index(font.font.blob.data(), font.font.index).unwrap();
    let location = skrifa::instance::LocationRef::new(normalized_coords);
    let metrics =

View on GitHub (pinned to 3fd8f2ec03)

Solutions

  1. Subset the font or reduce the number of distinct glyphs below 65535.
  2. Embed fewer characters via the glyph embedding options.

When it happens

Trigger: Thrown at internal/compiler/passes/embed_glyphs.rs:400 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/eb9450e4562a744d. Report an issue: GitHub.