| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2010,2011,2012 Google, Inc. | 2 * Copyright © 2010,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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT = HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE
_LATE | 49 HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT = HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE
_LATE |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 | 52 |
| 53 /* Master OT shaper list */ | 53 /* Master OT shaper list */ |
| 54 #define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \ | 54 #define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \ |
| 55 HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \ | 55 HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \ |
| 56 HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \ | 56 HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \ |
| 57 HB_COMPLEX_SHAPER_IMPLEMENT (hangul) \ | 57 HB_COMPLEX_SHAPER_IMPLEMENT (hangul) \ |
| 58 HB_COMPLEX_SHAPER_IMPLEMENT (hebrew) \ | 58 HB_COMPLEX_SHAPER_IMPLEMENT (hebrew) \ |
| 59 HB_COMPLEX_SHAPER_IMPLEMENT (myanmar_old) \ |
| 59 HB_COMPLEX_SHAPER_IMPLEMENT (indic) \ | 60 HB_COMPLEX_SHAPER_IMPLEMENT (indic) \ |
| 60 HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \ | 61 HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \ |
| 61 HB_COMPLEX_SHAPER_IMPLEMENT (sea) \ | 62 HB_COMPLEX_SHAPER_IMPLEMENT (sea) \ |
| 62 HB_COMPLEX_SHAPER_IMPLEMENT (thai) \ | 63 HB_COMPLEX_SHAPER_IMPLEMENT (thai) \ |
| 63 HB_COMPLEX_SHAPER_IMPLEMENT (tibetan) \ | 64 HB_COMPLEX_SHAPER_IMPLEMENT (tibetan) \ |
| 64 /* ^--- Add new shapers here */ | 65 /* ^--- Add new shapers here */ |
| 65 | 66 |
| 66 | 67 |
| 67 struct hb_ot_complex_shaper_t | 68 struct hb_ot_complex_shaper_t |
| 68 { | 69 { |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 hb_ot_layout_language_find_feature (planner->face, HB_OT_TAG_GSUB, | 323 hb_ot_layout_language_find_feature (planner->face, HB_OT_TAG_GSUB, |
| 323 planner->map.script_index[0], | 324 planner->map.script_index[0], |
| 324 planner->map.language_index[0], | 325 planner->map.language_index[0], |
| 325 HB_TAG ('p','r','e','f'), | 326 HB_TAG ('p','r','e','f'), |
| 326 NULL)) | 327 NULL)) |
| 327 return &_hb_ot_complex_shaper_indic; | 328 return &_hb_ot_complex_shaper_indic; |
| 328 else | 329 else |
| 329 return &_hb_ot_complex_shaper_default; | 330 return &_hb_ot_complex_shaper_default; |
| 330 | 331 |
| 331 case HB_SCRIPT_MYANMAR: | 332 case HB_SCRIPT_MYANMAR: |
| 332 /* For Myanmar, we only want to use the Myanmar shaper if the "new" script | |
| 333 * tag is found. For "old" script tag we want to use the default shaper.
*/ | |
| 334 if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','2')) | 333 if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','2')) |
| 335 return &_hb_ot_complex_shaper_myanmar; | 334 return &_hb_ot_complex_shaper_myanmar; |
| 335 else if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','r')) |
| 336 return &_hb_ot_complex_shaper_myanmar_old; |
| 336 else | 337 else |
| 337 return &_hb_ot_complex_shaper_default; | 338 return &_hb_ot_complex_shaper_default; |
| 338 | 339 |
| 339 /* Unicode-4.1 additions */ | 340 /* Unicode-4.1 additions */ |
| 340 case HB_SCRIPT_BUGINESE: | 341 case HB_SCRIPT_BUGINESE: |
| 341 case HB_SCRIPT_NEW_TAI_LUE: | 342 case HB_SCRIPT_NEW_TAI_LUE: |
| 342 | 343 |
| 343 /* Unicode-5.1 additions */ | 344 /* Unicode-5.1 additions */ |
| 344 case HB_SCRIPT_CHAM: | 345 case HB_SCRIPT_CHAM: |
| 345 | 346 |
| 346 /* Unicode-5.2 additions */ | 347 /* Unicode-5.2 additions */ |
| 347 case HB_SCRIPT_TAI_THAM: | 348 case HB_SCRIPT_TAI_THAM: |
| 348 | 349 |
| 349 /* If the designer designed the font for the 'DFLT' script, | 350 /* If the designer designed the font for the 'DFLT' script, |
| 350 * use the default shaper. Otherwise, use the Indic shaper. | 351 * use the default shaper. Otherwise, use the Indic shaper. |
| 351 * Note that for some simple scripts, there may not be *any* | 352 * Note that for some simple scripts, there may not be *any* |
| 352 * GSUB/GPOS needed, so there may be no scripts found! */ | 353 * GSUB/GPOS needed, so there may be no scripts found! */ |
| 353 if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T')) | 354 if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T')) |
| 354 return &_hb_ot_complex_shaper_default; | 355 return &_hb_ot_complex_shaper_default; |
| 355 else | 356 else |
| 356 return &_hb_ot_complex_shaper_sea; | 357 return &_hb_ot_complex_shaper_sea; |
| 357 } | 358 } |
| 358 } | 359 } |
| 359 | 360 |
| 360 | 361 |
| 361 #endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */ | 362 #endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */ |
| OLD | NEW |