slint icon indicating copy to clipboard operation
slint copied to clipboard

Some characters are rendered as boxes

Open BrandonXLF opened this issue 1 month ago • 2 comments

Bug Description

Certain characters (such as tab) are displayed as an empty box rather than the character.

Image

Reproducible Code (if applicable)

export component TestCase inherits Window {
    Text {
        text: "This is a tab:	";
    }
}

Environment Details

  • Slint Version: 1.14.1 (works in 1.13.1)
  • Platform/OS: Windows 11
  • Programming Language: Rust
  • Backend/Renderer: Qt, Winit / femtovg, Winit / Skia (Winit / software works fine)

Product Impact

No response

BrandonXLF avatar Nov 29 '25 05:11 BrandonXLF

I haven‘t tried to reproduce this, but it’s very plausible. I know for femtovg somebody contributed a fix that solved this but that solution is not on the glyph level and so it wouldn’t apply with the new code path taken with parley.

I think characters that aren’t printable should not produce any pixels but their advance should be taken into account. Characters for which no glyphs are present in the font - due to lack of coverage - should use a replacement visualization such as the „box“.

I was hoping that this decision is taken within parley, so exclusion of control, formatting, etc categories.

tronical avatar Nov 29 '25 09:11 tronical

I’ll mark this as a legit bug, although analysis remains pending on where this should be fixed (slint or parley).

tronical avatar Nov 29 '25 09:11 tronical