freetype/harfbuzz: getGlyphInfos() returns incorrect values #415
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#415
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When using harfbuzz with freetype, getGlyphInfos() returns incorrect values compared to using hb_buffer_get_glyph_infos() directly.
Here's code using Arabic text with Amiri-Regular font, but the problem happens in English and other fonts too.
The output of the program is
optionally, could you compare output without binding?
Sure. It looks to be the same.
i believe #418 can fix this. but as a workaround you can test it yourself because i don't have a codebase for testing (this is an issue)
Hey Ali. Unfortunately the issue hasn't been fixed. The length wasn't the problem. I looked into it today and it seems the values of the codepoint, mask, and cluster are getting mixed together. I was able to solve it by changing the GlyphInfo struct members to
Adding mask, var1 and var2 makes the size of GlyphInfo the same as hb_glyph_info_t. and results in correct values.
thanks for the solution
Happy to help. And thanks for the bindings, they've been very helpful.