[HarfBuzz] Questions regarding hb_language_t

Ariel Malka ariel at chronotext.org
Sun Dec 15 06:38:51 PST 2013


I have rendered text successfully with a few different complex scripts
("Hebr", "Arab", "Hang", "Hani", "Thai", etc.) and it looks like the
hb_buffer_set_language() is not affecting the result.

The first question I'm asking is therefore: what is the purpose
of hb_buffer_set_language()?
Or in other words: is there a combination which require both the language
and script values to be defined?

My second question is regarding mapping: is there a way to obtain a
hb_script_tag from a language-code string (e.g. "he" -> HB_SCRIPT_HEBREW)?

I tried the following, but it fails:

hb_language_t lang = hb_language_from_string("ko", -1);
hb_tag_t tag = hb_ot_tag_from_language(lang);

char buf[4];
hb_tag_to_string(tag, buf);
assert(string(buf, 4) == "Hang");

hb_script_t script = hb_ot_tag_to_script(tag);
assert(script == HB_SCRIPT_HANGUL);

Thanks!

Ariel
http://chronotext.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20131215/6dcc307c/attachment.html>


More information about the HarfBuzz mailing list