Gtk4.jl
Gtk4.jl copied to clipboard
Setting font to a button using CSS causes font errors
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.
Is it an expected behavior?
Definitely not expected, this is a bug in one of the libraries that I've only seen on Windows. Probably the same as #32.
There is a fix in the works, see https://github.com/JuliaGtk/Gtk4.jl/issues/32#issuecomment-2307550314
Fixed by https://github.com/JuliaPackaging/Yggdrasil/pull/8392