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

GtkLabel markup can't display characters

Open Rratic opened this issue 1 year ago • 2 comments

label = GtkLabel("")
Gtk4.markup(label, """<span size="x-large">A</span>""")

A displays as a small box with four hex digits

environment:

julia> versioninfo()
Julia Version 1.9.1
Commit 147bdf428c (2023-06-07 08:27 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores

(@v1.9) pkg> st Gtk4
Status `C:\Users\anonymous\.julia\environments\v1.9\Project.toml`
  [9db2cae5] Gtk4 v0.4.1

Rratic avatar Jun 24 '23 11:06 Rratic

I don't know what's wrong but now all the texts display as small box with four hex digits

Rratic avatar Jun 24 '23 12:06 Rratic

It works correctly for me on Linux, but I also see the boxes on Windows. Seems likely to be an upstream issue -- I'll try updating Pango_jll.

jwahlstrand avatar Jun 24 '23 23:06 jwahlstrand

Updating HarfBuzz_jll, a dependency of Pango_jll and GTK4_jll, fixes this. There is a PR: https://github.com/JuliaPackaging/Yggdrasil/pull/8392

Until that goes through (and a few other PR's that will be necessary to allow that version of HarfBuzz to be used by other JLL's), here is a way to use updated JLL's:

using Pkg

Pkg.add(url="https://github.com/jwahlstrand/libass_jll.jl")
Pkg.add(url="https://github.com/jwahlstrand/Pango_jll.jl")
Pkg.add(url="https://github.com/jwahlstrand/HarfBuzz_jll.jl")

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