Chromium Code Reviews| 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1100 /* #### stil missing: identify invalid character combinations */ | 1100 /* #### stil missing: identify invalid character combinations */ |
| 1101 HB_Bool HB_ArabicShape(HB_ShaperItem *item) | 1101 HB_Bool HB_ArabicShape(HB_ShaperItem *item) |
| 1102 { | 1102 { |
| 1103 int slen; | 1103 int slen; |
| 1104 HB_Bool haveGlyphs; | 1104 HB_Bool haveGlyphs; |
| 1105 HB_STACKARRAY(HB_UChar16, shapedChars, item->item.length); | 1105 HB_STACKARRAY(HB_UChar16, shapedChars, item->item.length); |
| 1106 | 1106 |
| 1107 assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Scri pt_Syriac | 1107 assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Scri pt_Syriac |
| 1108 || item->item.script == HB_Script_Nko); | 1108 || item->item.script == HB_Script_Nko); |
| 1109 | 1109 |
| 1110 item->shaperFlags |= HB_ShaperFlag_ArabicHack; | |
|
agl
2010/01/15 10:21:57
Since this code is scheduled for demolition soon(i
| |
| 1110 #ifndef NO_OPENTYPE | 1111 #ifndef NO_OPENTYPE |
| 1111 | 1112 |
| 1112 if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_fea tures : syriac_features)) { | 1113 if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_fea tures : syriac_features)) { |
| 1113 HB_Bool ot_ok; | 1114 HB_Bool ot_ok; |
| 1114 if (arabicSyriacOpenTypeShape(item, &ot_ok)) | 1115 if (arabicSyriacOpenTypeShape(item, &ot_ok)) |
| 1115 return TRUE; | 1116 return TRUE; |
| 1116 if (ot_ok) | 1117 if (ot_ok) |
| 1117 return FALSE; | 1118 return FALSE; |
| 1118 /* fall through to the non OT code*/ | 1119 /* fall through to the non OT code*/ |
| 1119 } | 1120 } |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 1135 HB_FREE_STACKARRAY(shapedChars); | 1136 HB_FREE_STACKARRAY(shapedChars); |
| 1136 | 1137 |
| 1137 if (!haveGlyphs) | 1138 if (!haveGlyphs) |
| 1138 return FALSE; | 1139 return FALSE; |
| 1139 | 1140 |
| 1140 HB_HeuristicPosition(item); | 1141 HB_HeuristicPosition(item); |
| 1141 return TRUE; | 1142 return TRUE; |
| 1142 } | 1143 } |
| 1143 | 1144 |
| 1144 | 1145 |
| OLD | NEW |