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

Side by Side Diff: third_party/harfbuzz/chromium.patch

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/README.chromium ('k') | third_party/harfbuzz/src/harfbuzz-arabic.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/contrib/harfbuzz-unicode.c b/contrib/harfbuzz-unicode.c 1 diff --git a/contrib/harfbuzz-unicode.c b/contrib/harfbuzz-unicode.c
2 index 72c5cf2..49e47b0 100644 2 index 72c5cf2..49e47b0 100644
3 --- a/contrib/harfbuzz-unicode.c 3 --- a/contrib/harfbuzz-unicode.c
4 +++ b/contrib/harfbuzz-unicode.c 4 +++ b/contrib/harfbuzz-unicode.c
5 @@ -120,7 +120,6 @@ hb_utf16_script_run_next(unsigned *num_code_points, HB_Scrip tItem *output, 5 @@ -120,7 +120,6 @@ hb_utf16_script_run_next(unsigned *num_code_points, HB_Scrip tItem *output,
6 current_script = script; 6 current_script = script;
7 continue; 7 continue;
8 } else if (script == HB_Script_Inherited) { 8 } else if (script == HB_Script_Inherited) {
9 - current_script = script; 9 - current_script = script;
10 continue; 10 continue;
11 } else { 11 } else {
12 *iter = prev_iter; 12 *iter = prev_iter;
13 @@ -171,7 +170,10 @@ hb_utf16_script_run_prev(unsigned *num_code_points, HB_Scri ptItem *output, 13 @@ -171,7 +170,10 @@ hb_utf16_script_run_prev(unsigned *num_code_points, HB_Scri ptItem *output,
14 current_script = script; 14 current_script = script;
15 continue; 15 continue;
16 } else if (script == HB_Script_Inherited) { 16 } else if (script == HB_Script_Inherited) {
17 - current_script = script; 17 - current_script = script;
18 + // Just assume that whatever follows this combining character is within 18 + // Just assume that whatever follows this combining character is within
19 + // the same script. This is incorrect if you had language1 + combining 19 + // the same script. This is incorrect if you had language1 + combining
20 + // char + language 2, but that is rare and this code is suspicious 20 + // char + language 2, but that is rare and this code is suspicious
21 + // anyway. 21 + // anyway.
22 continue; 22 continue;
23 } else { 23 } else {
24 *iter = prev_iter; 24 *iter = prev_iter;
25 diff --git a/src/harfbuzz-arabic.c b/src/harfbuzz-arabic.c 25 diff --git a/src/harfbuzz-arabic.c b/src/harfbuzz-arabic.c
26 index 3837087..ce2ca6c 100644 26 index 51f839a..af40bf8 100644
27 --- a/src/harfbuzz-arabic.c 27 --- a/src/harfbuzz-arabic.c
28 +++ b/src/harfbuzz-arabic.c 28 +++ b/src/harfbuzz-arabic.c
29 @@ -1107,6 +1107,7 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item) 29 @@ -1107,6 +1107,7 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item)
30 assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Scr ipt_Syriac 30 assert(item->item.script == HB_Script_Arabic || item->item.script == HB_Scr ipt_Syriac
31 || item->item.script == HB_Script_Nko); 31 || item->item.script == HB_Script_Nko);
32 32
33 + item->shaperFlags |= HB_ShaperFlag_ForceMarksToZeroWidth; 33 + item->shaperFlags |= HB_ShaperFlag_ForceMarksToZeroWidth;
34 #ifndef NO_OPENTYPE 34 #ifndef NO_OPENTYPE
35 35
36 if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_fe atures : syriac_features)) { 36 if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_fe atures : syriac_features)) {
37 diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp 37 diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
38 index 7d433ea..dd86a40 100644 38 index 7fd04a9..66f0ea6 100644
39 --- a/src/harfbuzz-shaper.cpp 39 --- a/src/harfbuzz-shaper.cpp
40 +++ b/src/harfbuzz-shaper.cpp 40 +++ b/src/harfbuzz-shaper.cpp
41 @@ -430,8 +430,6 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item) 41 @@ -430,8 +430,6 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
42 42
43 // ### zeroWidth and justification are missing here!!!!! 43 // ### zeroWidth and justification are missing here!!!!!
44 44
45 - assert(item->num_glyphs <= length); 45 - assert(item->num_glyphs <= length);
46 - 46 -
47 // qDebug("QScriptEngine::heuristicSetGlyphAttributes, num_glyphs=%d", item ->num_glyphs); 47 // qDebug("QScriptEngine::heuristicSetGlyphAttributes, num_glyphs=%d", item ->num_glyphs);
48 HB_GlyphAttributes *attributes = item->attributes; 48 HB_GlyphAttributes *attributes = item->attributes;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 HB_ShaperFlag_NoKerning = 1, 113 HB_ShaperFlag_NoKerning = 1,
114 - HB_ShaperFlag_UseDesignMetrics = 2 114 - HB_ShaperFlag_UseDesignMetrics = 2
115 + HB_ShaperFlag_UseDesignMetrics = 1 << 1, 115 + HB_ShaperFlag_UseDesignMetrics = 1 << 1,
116 + /* Arabic vowels in some fonts (Times New Roman, at least) have 116 + /* Arabic vowels in some fonts (Times New Roman, at least) have
117 + non-zero advances, when they should be zero. Setting this shaper 117 + non-zero advances, when they should be zero. Setting this shaper
118 + flag causes us to zero out the advances for mark glyphs. */ 118 + flag causes us to zero out the advances for mark glyphs. */
119 + HB_ShaperFlag_ForceMarksToZeroWidth = 1 << 2 119 + HB_ShaperFlag_ForceMarksToZeroWidth = 1 << 2
120 } HB_ShaperFlag; 120 } HB_ShaperFlag;
121 121
122 /* 122 /*
123 diff --git a/src/harfbuzz-tibetan.c b/src/harfbuzz-tibetan.c
124 index 847ac52..6f9a55b 100644
125 --- a/src/harfbuzz-tibetan.c
126 +++ b/src/harfbuzz-tibetan.c
127 @@ -90,7 +90,7 @@ static const unsigned char tibetanForm[0x80] = {
128
129
130 #define tibetan_form(c) \
131 - ((c) >= 0x0f40 && (c) <= 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : TibetanOther)
132 + ((c) >= 0x0f40 && (c) < 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : T ibetanOther)
133
134 static const HB_OpenTypeFeature tibetan_features[] = {
135 { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
136 diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
137 index ce4d4ac..6b4d6d2 100644
138 --- a/src/harfbuzz-shaper.cpp
139 +++ b/src/harfbuzz-shaper.cpp
140 @@ -1263,16 +1263,13 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int ava ilableGlyphs, HB_Bool do
141 // (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6),
142 // positions[i].back, positions[i].new_advance);
143
144 - HB_Fixed adjustment = (item->item.bidiLevel % 2) ? -positions[i].x_ advance : positions[i].x_advance;
145 + HB_Fixed adjustment = positions[i].x_advance;
146
147 if (!(face->current_flags & HB_ShaperFlag_UseDesignMetrics))
148 adjustment = HB_FIXED_ROUND(adjustment);
149
150 - if (positions[i].new_advance) {
151 - advances[i] = adjustment;
152 - } else {
153 + if (positions[i].new_advance == 0)
154 advances[i] += adjustment;
155 - }
156
157 int back = 0;
158 HB_FixedPoint *offsets = item->offsets;
OLDNEW
« no previous file with comments | « third_party/harfbuzz/README.chromium ('k') | third_party/harfbuzz/src/harfbuzz-arabic.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698