slint/sixtyfps_runtime/rendering_backends/gl
Simon Hausmann 30e79d3ea2 Fix panic with GL backend when using non-existent font families
The database is not empty, as the changed expect() suggests, but instead
it just means that the family could not be found. This can happen for
example with something like this:

export App := Window {
    Text {
        text: "Ok";
        font-family: "Non-existent";
    }
}

or it can also happen when loading the printer demo in the online
editor, where a custom font is supposed to be available but that's not
implemented for wasm builds.

So instead of panicing, fall back to querying for a last-resort
sans-serif family.

For Linux, we register fontconfig's choice for sans-serif, otherwise
fontdb has defaults for macOS and Windows, and for wasm we register our
copy of DejaVu. So that cannot really fail....
2021-10-05 14:03:17 +02:00
..
fonts GL backend: add basic font fallback support for Linux 2021-09-17 18:58:18 +02:00
Cargo.toml Bump version number to 0.1.3 2021-10-05 10:31:45 +00:00
event_loop.rs Avoid over-eager animation ticks 2021-10-05 12:43:11 +02:00
fonts.rs Fix panic with GL backend when using non-existent font families 2021-10-05 14:03:17 +02:00
graphics_window.rs Fix abrupt process abort when showing a window with constraints in Weston/Wayland 2021-10-02 09:07:57 +02:00
images.rs Fix texture caching for images with the same source but different image-rendering properties 2021-09-06 13:47:41 +02:00
lib.rs Further speed up font handling in the GL backend 2021-10-04 15:11:55 +02:00
svg.rs GL backend: Fix rendering of SVGs with text inside 2021-09-30 14:32:46 +02:00