slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.94k stars 568 forks source link

Broken font rendering #4978

Closed lylythechosenone closed 5 months ago

lylythechosenone commented 5 months ago

The problem

There are holes in the rendered font. This only happens with externally-loaded fonts (in this case, Jost from Google Fonts).

Minimal example

import "./Jost-VariableFont_wght.ttf";

export component Main inherits Window {
    Text {
        text: "This is a minimal reproducible example";
        font-family: "Jost";
    }
}

System information

Rust information:

rustc 1.79.0-nightly (5f2c7d2bf 2024-03-25)
binary: rustc
commit-hash: 5f2c7d2bfd46cad00352ab7cd66242077e2e518c
commit-date: 2024-03-25
host: aarch64-apple-darwin
release: 1.79.0-nightly
LLVM version: 18.1.2

About MacOS:

  Model Name:   MacBook Pro
  Model Identifier: MacBookPro17,1
  Model Number: MYD92LL/A
  Chip: Apple M1
  Total Number of Cores:    8 (4 performance and 4 efficiency)
  Memory:   8 GB
  System Firmware Version:  10151.1.1
  OS Loader Version:    10151.1.1

Slint version: 1.5.1

Screenshots

image

ogoffart commented 5 months ago

Thanks for filling the issue. This is the same as https://github.com/slint-ui/slint/issues/2314 and i'll close this as duplicate.