[HarfBuzz] Guessing the script of a string.

Grigori Goronzy greg at chown.ath.cx
Fri Jun 24 02:27:08 PDT 2011


On 06/24/2011 11:21 AM, Eduardo Castiñeyra wrote:
> Hi,
> 
> I have been reviewing the hb_script_from_string code, and I don't
> understand how does it work. It seems like it were expecting some kind
> of 4-letter code at the begining of the string.
> 

This function is supposed to convert an ISO script code [1] to
HarfBuzz's internal script enum, as far as I know.

[1] http://unicode.org/iso15924/iso15924-codes.html

> Wouldn't it be more usefull to guess the script based on the Unicode
> ranges the chars are in based on the http://www.unicode.org/charts table?
> 

HarfBuzz should do this automatically if you don't explicitly set the
script of a hb_buffer. This seems to work fine for me here, at least.

Best regards,
Grigori Goronzy



More information about the HarfBuzz mailing list