Gtk4.jl icon indicating copy to clipboard operation
Gtk4.jl copied to clipboard

Setting font to a button using CSS causes font errors

Open PerformanceCoder opened this issue 1 year ago • 1 comments

Hi!

I'm not sure is it a bug or incorrect usage of a Gtk4.jl, but setting custom font-size to a button using CSS replaces characters with rectangles.

OS: Windows 10. Julia v1.8. MWE:

using Gtk4

css = """
button {
    font-size: 2.5em;
}
"""

win = GtkWindow("Fonts Demo", 400, 400)
cssProvider = GtkCssProvider(css)
push!(Gtk4.display(win), cssProvider)

push!(win, GtkButton("Hello, Fonts!"))
show(win)

if !isinteractive()
    c = Condition()
    signal_connect(win, :close_request) do widget
        notify(c)
    end
    @async Gtk4.GLib.glib_main()
    wait(c)
end

Illustration attached. bug

Is it an expected behavior?

PerformanceCoder avatar Oct 01 '23 00:10 PerformanceCoder

Definitely not expected, this is a bug in one of the libraries that I've only seen on Windows. Probably the same as #32.

jwahlstrand avatar Oct 01 '23 06:10 jwahlstrand

There is a fix in the works, see https://github.com/JuliaGtk/Gtk4.jl/issues/32#issuecomment-2307550314

jwahlstrand avatar Aug 23 '24 17:08 jwahlstrand

Fixed by https://github.com/JuliaPackaging/Yggdrasil/pull/8392

jwahlstrand avatar Aug 24 '24 00:08 jwahlstrand