| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2012 Google, Inc. | 2 * Copyright © 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 /* Populate arrays */ | 64 /* Populate arrays */ |
| 65 for (hb_codepoint_t u = SHAPING_TABLE_FIRST; u < SHAPING_TABLE_LAST + 1; u++) | 65 for (hb_codepoint_t u = SHAPING_TABLE_FIRST; u < SHAPING_TABLE_LAST + 1; u++) |
| 66 { | 66 { |
| 67 hb_codepoint_t s = shaping_table[u - SHAPING_TABLE_FIRST][feature_index]; | 67 hb_codepoint_t s = shaping_table[u - SHAPING_TABLE_FIRST][feature_index]; |
| 68 hb_codepoint_t u_glyph, s_glyph; | 68 hb_codepoint_t u_glyph, s_glyph; |
| 69 | 69 |
| 70 if (!s || | 70 if (!s || |
| 71 !hb_font_get_glyph (font, u, 0, &u_glyph) || | 71 !hb_font_get_glyph (font, u, 0, &u_glyph) || |
| 72 !hb_font_get_glyph (font, s, 0, &s_glyph) || | 72 !hb_font_get_glyph (font, s, 0, &s_glyph) || |
| 73 u_glyph == s_glyph || | 73 u_glyph == s_glyph || |
| 74 » u_glyph > 0xFFFF || s_glyph > 0xFFFF) | 74 » u_glyph > 0xFFFFu || s_glyph > 0xFFFFu) |
| 75 continue; | 75 continue; |
| 76 | 76 |
| 77 glyphs[num_glyphs].set (u_glyph); | 77 glyphs[num_glyphs].set (u_glyph); |
| 78 substitutes[num_glyphs].set (s_glyph); | 78 substitutes[num_glyphs].set (s_glyph); |
| 79 | 79 |
| 80 num_glyphs++; | 80 num_glyphs++; |
| 81 } | 81 } |
| 82 | 82 |
| 83 /* Bubble-sort! | 83 /* Bubble-sort! |
| 84 * May not be good-enough for presidential candidate interviews, but good-enou
gh for us... */ | 84 * May not be good-enough for presidential candidate interviews, but good-enou
gh for us... */ |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 if (fallback_plan->lookup_array[i]) { | 251 if (fallback_plan->lookup_array[i]) { |
| 252 c.set_lookup_mask (fallback_plan->mask_array[i]); | 252 c.set_lookup_mask (fallback_plan->mask_array[i]); |
| 253 hb_ot_layout_substitute_lookup (&c, | 253 hb_ot_layout_substitute_lookup (&c, |
| 254 *fallback_plan->lookup_array[i], | 254 *fallback_plan->lookup_array[i], |
| 255 fallback_plan->accel_array[i]); | 255 fallback_plan->accel_array[i]); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 | 259 |
| 260 #endif /* HB_OT_SHAPE_COMPLEX_ARABIC_FALLBACK_HH */ | 260 #endif /* HB_OT_SHAPE_COMPLEX_ARABIC_FALLBACK_HH */ |
| OLD | NEW |