[HarfBuzz] isLetter function problems with indic characters
Peter Hunter
phunter at atex.com
Sun Sep 19 23:41:27 PDT 2010
I happened to come across the same issue
Seems to me that the return value for isLetter (and IsMark) is incorrectly determined
i.e.
static HB_Bool isLetter(HB_UChar16 ucs)
{
const int test = FLAG(HB_Letter_Uppercase) |
FLAG(HB_Letter_Lowercase) |
FLAG(HB_Letter_Titlecase) |
FLAG(HB_Letter_Modifier) |
FLAG(HB_Letter_Other);
return FLAG(HB_GetUnicodeCharCategory(ucs)) & test;
}
The return value is a HB_BOOL (which is a byte) whereas the computed mask value for everything other than HB_Letter_Other is greater than 256.
A more appropriate return value would be
return (FLAG(HB_GetUnicodeCharCategory(ucs)) & test) != 0;
Peter Hunter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20100920/b1f773c9/attachment.html>
More information about the HarfBuzz
mailing list