Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/harfbuzz/src/harfbuzz-arabic.c

Issue 10824101: Harfbuzz roll 3ab7b37bdebf0f8773493a1fee910b151c4de30f (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/harfbuzz/chromium.patch ('k') | third_party/harfbuzz/src/harfbuzz-global.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ForceMarksToZeroWidth; 1110 item->shaperFlags |= HB_ShaperFlag_ForceMarksToZeroWidth;
1111 #ifndef NO_OPENTYPE 1111 #ifndef NO_OPENTYPE
1112 1112
1113 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)) {
1114 HB_Bool ot_ok; 1114 HB_Bool ot_ok;
1115 if (arabicSyriacOpenTypeShape(item, &ot_ok)) 1115 if (arabicSyriacOpenTypeShape(item, &ot_ok)) {
1116 HB_FREE_STACKARRAY(shapedChars);
1116 return TRUE; 1117 return TRUE;
1117 if (ot_ok) 1118 }
1119 if (ot_ok) {
1120 HB_FREE_STACKARRAY(shapedChars);
1118 return FALSE; 1121 return FALSE;
1119 /* fall through to the non OT code*/ 1122 /* fall through to the non OT code*/
1123 }
1120 } 1124 }
1121 #endif 1125 #endif
1122 1126
1123 if (item->item.script != HB_Script_Arabic) 1127 if (item->item.script != HB_Script_Arabic) {
1128 HB_FREE_STACKARRAY(shapedChars);
1124 return HB_BasicShape(item); 1129 return HB_BasicShape(item);
1130 }
1125 1131
1126 shapedString(item->string, item->stringLength, item->item.pos, item->item.le ngth, shapedChars, &slen, 1132 shapedString(item->string, item->stringLength, item->item.pos, item->item.le ngth, shapedChars, &slen,
1127 item->item.bidiLevel % 2, 1133 item->item.bidiLevel % 2,
1128 item->attributes, item->log_clusters); 1134 item->attributes, item->log_clusters);
1129 1135
1130 haveGlyphs = item->font->klass 1136 haveGlyphs = item->font->klass
1131 ->convertStringToGlyphIndices(item->font, 1137 ->convertStringToGlyphIndices(item->font,
1132 shapedChars, slen, 1138 shapedChars, slen,
1133 item->glyphs, &item->num_glyphs, 1139 item->glyphs, &item->num_glyphs,
1134 item->item.bidiLevel % 2); 1140 item->item.bidiLevel % 2);
1135 1141
1136 HB_FREE_STACKARRAY(shapedChars); 1142 HB_FREE_STACKARRAY(shapedChars);
1137 1143
1138 if (!haveGlyphs) 1144 if (!haveGlyphs)
1139 return FALSE; 1145 return FALSE;
1140 1146
1141 HB_HeuristicPosition(item); 1147 HB_HeuristicPosition(item);
1142 return TRUE; 1148 return TRUE;
1143 } 1149 }
1144 1150
1145 1151
OLDNEW
« no previous file with comments | « third_party/harfbuzz/chromium.patch ('k') | third_party/harfbuzz/src/harfbuzz-global.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698