[HarfBuzz] A couple of clarifications regarding HarfBuzz

Tom Hacohen tom.hacohen at partner.samsung.com
Wed Oct 20 08:07:34 PDT 2010

Dear all,

I have a couple of questions about things I don't completely understand.
1. What does the direction in hb_buffer mean (I'm only talking about LTR
and RTL, TTB and BTT have more implications)? From what I've seen, it
only controls whether it should reverse the order of buffer, or not.
2. What does language (in hb_buffer) does? Isn't script enough?
3. What's the implications of working without setting Unicode functions?
I don't want to depend on GLib/ICU, and I want to know if I should take
the effort of implementing my own.
4. I assume the parameter to hb_buffer_create is for allocating the
needed space as a single bulk and thus avoiding memory fragmentation,
but how much should I allocate? I mean, I don't know HarfBuzz's
internals to guess, should I just pass my string's length? Will harfbuzz
do the needed calculations?
5. What do the features in hb_shape stand for and how do I manipulate
them? (I assume this question is because my lack of knowledge and not
HarfBuzz's lack of docs).
6. How can I translate an index in the buffer to an index in the
pre-shaped string? (Because indexes may change because of ligatures)
7. That's maybe not completely HarfBuzz related, but how do I get the
pen positions inside a ligature? (for drawing cursor, handling
selection, etc etc) or should I just treat the ligature as one group
once it has shaped into one?

I'll probably have more questions later, but those are the basic ones I
have, thanks,

More information about the HarfBuzz mailing list