-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font / Text error #2003
Comments
Can you try |
Yes, this regenerated the font: julia> fig, ax, p = scatter(positions)
[ Info: Makie is caching fonts, this may take a while. Needed only on first run! However, the figure is still outputted with boxes instead of numbers (like in the figure above). |
Can you try any other previously unused font? Just to check that it's not font-related |
Checking what |
I tried a different font: f = Figure(backgroundcolor = RGBf(0.98, 0.98, 0.98),
resolution = (400, 200))
ga = f[1, 1] = GridLayout()
Label(ga[1, 1:2, Top()], "Stimulus ratings", valign = :bottom,
font = "Noto",
padding = (0, 0, 5, 0)) image(Makie.get_texture_atlas().data) BTW:
into my VSCode settings, because otherwise I run into the following error
|
The entries in the texture atlas look pretty weird. Does this generate a normal looking "a"? using Makie.FreeTypeAbstraction
image(renderface(findfont("Noto"), 'a', 100)[1][:, end:-1:1]) If not maybe rebuilding FreeTypeAbstraction helps? |
But Does img = renderface(findfont("Noto"), 'a', 100)[1][:, end:-1:1]
sdf = Makie.sdistancefield(img, 4, 16)
image(sdf) look like a blurry "a"? |
Wow, what platform and Julia version is this? |
For reference - this is what The function is here: Maybe you can play around with it a bit to see what goes wrong? |
These white to black rings kinda look like integer overflows to me. Maybe there is an issue with |
I've tried julia v1.7.2 and julia v1.7.3 image(in_or_out) image(Makie.sdf(in_or_out, xres, yres) ./ downsample) julia> maximum(Makie.sdf(in_or_out, xres, yres) ./ downsample)
24.218729870931817
julia> Float16(maximum(Makie.sdf(in_or_out, xres, yres) ./ downsample))
Float16(3.135e-5) image(Float16.(Makie.sdf(in_or_out, xres, yres) ./ downsample)) EDIT: Okay there does seem to be an error with Float16: julia> Float16(4.)
Float16(0.0) EDIT2: This does work though: julia> Float16(4f0)
Float16(4.0) image(Float16.(Float32.(Makie.sdf(in_or_out, xres, yres) ./ downsample)))
I created an issue at julia: JuliaLang/julia#45528 |
I get julia> Float16(24.218729870931817)
Float16(24.22) so I guess that's part of the issue. Without the img = renderface(findfont("Noto"), 'a', 100)[1][:, end:-1:1]
sdf = Makie.sdistancefield(img, 4, 16) # without Float16 conversion if you want to continue investigating. https://gist.github.com/ffreyer/c952fcb74d4529e3b9023e1d151326c6 |
okay, the culprit does seem to be the LD_PRELOAD. I had to start Julia with the following, because of this error: JuliaGL/GLFW.jl#198 (comment) : LD_PRELOAD=/usr/lib64/libstdc++.so.6 /bin/julia With the PRELOAD Float16 returns garbage. |
After some time, I've used GLMakie again.
I tried the following:
However, it seems that there is an error with the font.
Each number is displayed as a box (see figure).
How can I regenerate the font? There is no error thrown.
The text was updated successfully, but these errors were encountered: