Replies: 1 comment
-
I don't think there should be a problem with using HarfBuzz positioning together with "plane bounds". If I understand it correctly, the only problem is to figure out the factor to convert both to the same units. I think the surest way to find that out would be to get the horizontal difference between two regular characters (with no kerning or ligatures) from HarfBuzz and compare that with the advance value from MSDF-atlas-gen. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Rendering works great when I use the generated glyph advances and plane bounds.
However, I'm trying to use the glyphs from the atlas with advances and offsets from a text shaping library (harfbuzz). (the intent is to get proper ligatures, combining diacritics, kerning, etc.)
I think harfbuzz's offset and advance units are 64ths of a point. However, when I divide out the "size" parameter reported in the JSON file, I get something that's too crowded. Mixing in a (guessed) pixel : point ratio of 4:3 didn't seem correct either.
I've been messing around with the numbers but haven't been able to get it to work.
It does look like the plane bounds depend on the "size" parameter (when I change it, the numbers approximately scale), but it doesn't seem to be exact. I've noticed some coordinates for the same glyph have a sign change when I use a different size for the atlas, for example.
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions