| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2011,2012 Google, Inc. | 2 * Copyright © 2011,2012 Google, Inc. |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping 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 17 matching lines...) Expand all Loading... |
| 28 #include "hb-ot-layout-gsubgpos-private.hh" | 28 #include "hb-ot-layout-gsubgpos-private.hh" |
| 29 | 29 |
| 30 static unsigned int | 30 static unsigned int |
| 31 recategorize_combining_class (hb_codepoint_t u, | 31 recategorize_combining_class (hb_codepoint_t u, |
| 32 unsigned int klass) | 32 unsigned int klass) |
| 33 { | 33 { |
| 34 if (klass >= 200) | 34 if (klass >= 200) |
| 35 return klass; | 35 return klass; |
| 36 | 36 |
| 37 /* Thai / Lao need some per-character work. */ | 37 /* Thai / Lao need some per-character work. */ |
| 38 if ((u & ~0xFF) == 0x0E00) | 38 if ((u & ~0xFF) == 0x0E00u) |
| 39 { | 39 { |
| 40 if (unlikely (klass == 0)) | 40 if (unlikely (klass == 0)) |
| 41 { | 41 { |
| 42 switch (u) | 42 switch (u) |
| 43 { | 43 { |
| 44 case 0x0E31: | 44 case 0x0E31u: |
| 45 case 0x0E34: | 45 case 0x0E34u: |
| 46 case 0x0E35: | 46 case 0x0E35u: |
| 47 case 0x0E36: | 47 case 0x0E36u: |
| 48 case 0x0E37: | 48 case 0x0E37u: |
| 49 case 0x0E47: | 49 case 0x0E47u: |
| 50 case 0x0E4C: | 50 case 0x0E4Cu: |
| 51 case 0x0E4D: | 51 case 0x0E4Du: |
| 52 case 0x0E4E: | 52 case 0x0E4Eu: |
| 53 klass = HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT; | 53 klass = HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT; |
| 54 break; | 54 break; |
| 55 | 55 |
| 56 case 0x0EB1: | 56 case 0x0EB1u: |
| 57 case 0x0EB4: | 57 case 0x0EB4u: |
| 58 case 0x0EB5: | 58 case 0x0EB5u: |
| 59 case 0x0EB6: | 59 case 0x0EB6u: |
| 60 case 0x0EB7: | 60 case 0x0EB7u: |
| 61 case 0x0EBB: | 61 case 0x0EBBu: |
| 62 case 0x0ECC: | 62 case 0x0ECCu: |
| 63 case 0x0ECD: | 63 case 0x0ECDu: |
| 64 klass = HB_UNICODE_COMBINING_CLASS_ABOVE; | 64 klass = HB_UNICODE_COMBINING_CLASS_ABOVE; |
| 65 break; | 65 break; |
| 66 | 66 |
| 67 case 0x0EBC: | 67 case 0x0EBCu: |
| 68 klass = HB_UNICODE_COMBINING_CLASS_BELOW; | 68 klass = HB_UNICODE_COMBINING_CLASS_BELOW; |
| 69 break; | 69 break; |
| 70 } | 70 } |
| 71 } else { | 71 } else { |
| 72 /* Thai virama is below-right */ | 72 /* Thai virama is below-right */ |
| 73 if (u == 0x0E3A) | 73 if (u == 0x0E3Au) |
| 74 klass = HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT; | 74 klass = HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT; |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 switch (klass) | 78 switch (klass) |
| 79 { | 79 { |
| 80 | 80 |
| 81 /* Hebrew */ | 81 /* Hebrew */ |
| 82 | 82 |
| 83 case HB_MODIFIED_COMBINING_CLASS_CCC10: /* sheva */ | 83 case HB_MODIFIED_COMBINING_CLASS_CCC10: /* sheva */ |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 hb_position_t kern1 = y_kern >> 1; | 470 hb_position_t kern1 = y_kern >> 1; |
| 471 hb_position_t kern2 = y_kern - kern1; | 471 hb_position_t kern2 = y_kern - kern1; |
| 472 pos[idx].y_advance += kern1; | 472 pos[idx].y_advance += kern1; |
| 473 pos[skippy_iter.idx].y_advance += kern2; | 473 pos[skippy_iter.idx].y_advance += kern2; |
| 474 pos[skippy_iter.idx].y_offset += kern2; | 474 pos[skippy_iter.idx].y_offset += kern2; |
| 475 } | 475 } |
| 476 | 476 |
| 477 idx = skippy_iter.idx; | 477 idx = skippy_iter.idx; |
| 478 } | 478 } |
| 479 } | 479 } |
| OLD | NEW |