| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, an OpenType Layout engine library. | 4 * This is part of HarfBuzz, an OpenType Layout engine library. |
| 5 * | 5 * |
| 6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
| 7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
| 8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
| 9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
| 10 * all copies of this software. | 10 * all copies of this software. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #define FLAG(x) (1 << (x)) | 31 #define FLAG(x) (1 << (x)) |
| 32 | 32 |
| 33 static HB_Bool isLetter(HB_UChar16 ucs) | 33 static HB_Bool isLetter(HB_UChar16 ucs) |
| 34 { | 34 { |
| 35 const int test = FLAG(HB_Letter_Uppercase) | | 35 const int test = FLAG(HB_Letter_Uppercase) | |
| 36 FLAG(HB_Letter_Lowercase) | | 36 FLAG(HB_Letter_Lowercase) | |
| 37 FLAG(HB_Letter_Titlecase) | | 37 FLAG(HB_Letter_Titlecase) | |
| 38 FLAG(HB_Letter_Modifier) | | 38 FLAG(HB_Letter_Modifier) | |
| 39 FLAG(HB_Letter_Other); | 39 FLAG(HB_Letter_Other); |
| 40 return FLAG(HB_GetUnicodeCharCategory(ucs)) & test; | 40 return !!(FLAG(HB_GetUnicodeCharCategory(ucs)) & test); |
| 41 } | 41 } |
| 42 | 42 |
| 43 static HB_Bool isMark(HB_UChar16 ucs) | 43 static HB_Bool isMark(HB_UChar16 ucs) |
| 44 { | 44 { |
| 45 const int test = FLAG(HB_Mark_NonSpacing) | | 45 const int test = FLAG(HB_Mark_NonSpacing) | |
| 46 FLAG(HB_Mark_SpacingCombining) | | 46 FLAG(HB_Mark_SpacingCombining) | |
| 47 FLAG(HB_Mark_Enclosing); | 47 FLAG(HB_Mark_Enclosing); |
| 48 return FLAG(HB_GetUnicodeCharCategory(ucs)) & test; | 48 return !!(FLAG(HB_GetUnicodeCharCategory(ucs)) & test); |
| 49 } | 49 } |
| 50 | 50 |
| 51 enum Form { | 51 enum Form { |
| 52 Invalid = 0x0, | 52 Invalid = 0x0, |
| 53 UnknownForm = Invalid, | 53 UnknownForm = Invalid, |
| 54 Consonant, | 54 Consonant, |
| 55 Nukta, | 55 Nukta, |
| 56 Halant, | 56 Halant, |
| 57 Matra, | 57 Matra, |
| 58 VowelMark, | 58 VowelMark, |
| (...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 ++uc; | 1883 ++uc; |
| 1884 ++i; | 1884 ++i; |
| 1885 } | 1885 } |
| 1886 assert(i == boundary); | 1886 assert(i == boundary); |
| 1887 } | 1887 } |
| 1888 | 1888 |
| 1889 | 1889 |
| 1890 } | 1890 } |
| 1891 | 1891 |
| 1892 | 1892 |
| OLD | NEW |