Skip to content

Bad kerning for small text in Qt backend #9831

@JoeJoeTV

Description

@JoeJoeTV

Bug Description

When having Text elements with small text (~10pt), the spacing between letters is inconsistent.
If the text is moved (e.g. Window resize), the spacing changes on a per-pixel basis.
It looks like nearest neighbour scaling is being performed on the text.

This issue does not seem to happen on the winit backend, but it does happen in styles other than the Qt style.

Examples:

Font Size 10px; Window Width 150px

Image

Font Size 10px; Window Width 153px

Image

Reproducible Code (if applicable)

export component App inherits Window {
    title: "Bug Test";

    width: 150px;
    height: 25px;

    Text {
        text: "tech bug longtext";
        font-size: 10pt;
    }
}

Environment Details

  • Slint Version: 1.14(.1)
  • Platform/OS: Windows 11
  • Programming Language: / (Only slint; slint-viewer)
  • Backend/Renderer: Qt (does not seem to happen with winit backend)

Product Impact

Smaller text is hard to read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:backend-qtThe Qt backend - including the qt style (mO,bS)a:textText rendering, fonts, Text input (mS,bF)need triagingIssue that the owner of the area still need to triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions