slint icon indicating copy to clipboard operation
slint copied to clipboard

Variable weight font only renders with a single weight

Open NigelBreslaw opened this issue 7 months ago • 4 comments

Bug Description

Inter.zip

The attached font exhibits the issue. In the demo below every example renders the same, instead of getting more and more bold.

Reproducible Code (if applicable)

import "Inter-VariableFont.ttf";
export component ExportedComponent {
    width: 200px;
    height: 200px;
    Rectangle {
        background: black;
    }

    property <[float]> font-weights: [100, 200, 300, 400, 500, 600, 700, 800, 900];

    VerticalLayout {
        alignment: start;
        for font-weight in font-weights: Text {
            text: "0123456789 \{self.font-weight}";
            font-family: "Inter";
            font-size: 16px;
            color: white;
            font-weight: font-weight;
        }
    }
}

Environment Details

  • Slint Version: 1.10
  • Platform/OS: Mac and Linux
  • Programming Language:
  • Backend/Renderer: Skia

Product Impact

No response

NigelBreslaw avatar Apr 14 '25 06:04 NigelBreslaw