| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2012,2013 Mozilla Foundation. | 2 * Copyright © 2012,2013 Mozilla Foundation. |
| 3 * Copyright © 2012,2013 Google, Inc. | 3 * Copyright © 2012,2013 Google, Inc. |
| 4 * | 4 * |
| 5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
| 6 * | 6 * |
| 7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
| 8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
| 9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
| 10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 * Next, compare the CGFont to the one we used to create our fonts. | 897 * Next, compare the CGFont to the one we used to create our fonts. |
| 898 * Even this doesn't work all the time. | 898 * Even this doesn't work all the time. |
| 899 * | 899 * |
| 900 * Finally, we compare PS names, which I don't think are unique... | 900 * Finally, we compare PS names, which I don't think are unique... |
| 901 * | 901 * |
| 902 * Looks like if we really want to be sure here we have to modify the | 902 * Looks like if we really want to be sure here we have to modify the |
| 903 * font to change the name table, similar to what we do in the uniscribe | 903 * font to change the name table, similar to what we do in the uniscribe |
| 904 * backend. | 904 * backend. |
| 905 * | 905 * |
| 906 * However, even that wouldn't work if we were passed in the CGFont to | 906 * However, even that wouldn't work if we were passed in the CGFont to |
| 907 » * begin with. | 907 » * construct a hb_face to begin with. |
| 908 » * | |
| 909 » * We might switch to checking PS name against "LastResort". That would | |
| 910 » * be safe for all fonts except for those named "Last Resort". Might be | |
| 911 » * better than what we have right now. | |
| 912 * | 908 * |
| 913 * See: http://github.com/behdad/harfbuzz/pull/36 | 909 * See: http://github.com/behdad/harfbuzz/pull/36 |
| 910 * |
| 911 * Also see: https://bugs.chromium.org/p/chromium/issues/detail?id=59709
8 |
| 914 */ | 912 */ |
| 915 bool matched = false; | 913 bool matched = false; |
| 916 for (unsigned int i = 0; i < range_records.len; i++) | 914 for (unsigned int i = 0; i < range_records.len; i++) |
| 917 if (range_records[i].font && CFEqual (run_ct_font, range_records[i].fo
nt)) | 915 if (range_records[i].font && CFEqual (run_ct_font, range_records[i].fo
nt)) |
| 918 { | 916 { |
| 919 matched = true; | 917 matched = true; |
| 920 break; | 918 break; |
| 921 } | 919 } |
| 922 if (!matched) | 920 if (!matched) |
| 923 { | 921 { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 | 1259 |
| 1262 hb_bool_t | 1260 hb_bool_t |
| 1263 _hb_coretext_aat_shape (hb_shape_plan_t *shape_plan, | 1261 _hb_coretext_aat_shape (hb_shape_plan_t *shape_plan, |
| 1264 hb_font_t *font, | 1262 hb_font_t *font, |
| 1265 hb_buffer_t *buffer, | 1263 hb_buffer_t *buffer, |
| 1266 const hb_feature_t *features, | 1264 const hb_feature_t *features, |
| 1267 unsigned int num_features) | 1265 unsigned int num_features) |
| 1268 { | 1266 { |
| 1269 return _hb_coretext_shape (shape_plan, font, buffer, features, num_features); | 1267 return _hb_coretext_shape (shape_plan, font, buffer, features, num_features); |
| 1270 } | 1268 } |
| OLD | NEW |