summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--third_party/harfbuzz/README.chromium6
-rw-r--r--third_party/harfbuzz/chromium.patch40
-rw-r--r--third_party/harfbuzz/src/harfbuzz-arabic.c12
-rw-r--r--third_party/harfbuzz/src/harfbuzz-global.h4
-rw-r--r--third_party/harfbuzz/src/harfbuzz-gpos.c6
-rw-r--r--third_party/harfbuzz/src/harfbuzz-gsub.c6
-rw-r--r--third_party/harfbuzz/src/harfbuzz-myanmar.c4
-rw-r--r--third_party/harfbuzz/src/harfbuzz-tibetan.c1
8 files changed, 23 insertions, 56 deletions
diff --git a/third_party/harfbuzz/README.chromium b/third_party/harfbuzz/README.chromium
index 6fbc201..bbdb425 100644
--- a/third_party/harfbuzz/README.chromium
+++ b/third_party/harfbuzz/README.chromium
@@ -2,15 +2,15 @@ Name: harfbuzz
Short Name: harfbuzz
URL: http://anongit.freedesktop.org/git/harfbuzz.old.git
Version: 0
-Date: 20111101
-Revision: 93d8573ddcf97648983a1c1b5cdda8a3ec6d4432
+Date: 20120730
+Revision: 3ab7b37bdebf0f8773493a1fee910b151c4de30f
Security Critical: yes
License: MIT
Description:
"Harfbuzz is an OpenType text shaping engine."
Read http://behdad.org/text/ if you dare learn more.
-This code was taken from 90138e5a4d15c44f05456f90083ecacdc3196c8e
+This code was taken from 3ab7b37bdebf0f8773493a1fee910b151c4de30f
(git://anongit.freedesktop.org/harfbuzz)
The patch in chromium.patch was applied on top of this; I will talk with
diff --git a/third_party/harfbuzz/chromium.patch b/third_party/harfbuzz/chromium.patch
index eddf99a..91f99fc 100644
--- a/third_party/harfbuzz/chromium.patch
+++ b/third_party/harfbuzz/chromium.patch
@@ -23,7 +23,7 @@ index 72c5cf2..49e47b0 100644
} else {
*iter = prev_iter;
diff --git a/src/harfbuzz-arabic.c b/src/harfbuzz-arabic.c
-index 3837087..ce2ca6c 100644
+index 51f839a..af40bf8 100644
--- a/src/harfbuzz-arabic.c
+++ b/src/harfbuzz-arabic.c
@@ -1107,6 +1107,7 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item)
@@ -35,7 +35,7 @@ index 3837087..ce2ca6c 100644
if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) {
diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
-index 7d433ea..dd86a40 100644
+index 7fd04a9..66f0ea6 100644
--- a/src/harfbuzz-shaper.cpp
+++ b/src/harfbuzz-shaper.cpp
@@ -430,8 +430,6 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
@@ -120,39 +120,3 @@ index ab5c07a..72c9aa3 100644
} HB_ShaperFlag;
/*
-diff --git a/src/harfbuzz-tibetan.c b/src/harfbuzz-tibetan.c
-index 847ac52..6f9a55b 100644
---- a/src/harfbuzz-tibetan.c
-+++ b/src/harfbuzz-tibetan.c
-@@ -90,7 +90,7 @@ static const unsigned char tibetanForm[0x80] = {
-
-
- #define tibetan_form(c) \
-- ((c) >= 0x0f40 && (c) <= 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : TibetanOther)
-+ ((c) >= 0x0f40 && (c) < 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : TibetanOther)
-
- static const HB_OpenTypeFeature tibetan_features[] = {
- { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
-diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
-index ce4d4ac..6b4d6d2 100644
---- a/src/harfbuzz-shaper.cpp
-+++ b/src/harfbuzz-shaper.cpp
-@@ -1263,16 +1263,13 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool do
- // (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6),
- // positions[i].back, positions[i].new_advance);
-
-- HB_Fixed adjustment = (item->item.bidiLevel % 2) ? -positions[i].x_advance : positions[i].x_advance;
-+ HB_Fixed adjustment = positions[i].x_advance;
-
- if (!(face->current_flags & HB_ShaperFlag_UseDesignMetrics))
- adjustment = HB_FIXED_ROUND(adjustment);
-
-- if (positions[i].new_advance) {
-- advances[i] = adjustment;
-- } else {
-+ if (positions[i].new_advance == 0)
- advances[i] += adjustment;
-- }
-
- int back = 0;
- HB_FixedPoint *offsets = item->offsets;
diff --git a/third_party/harfbuzz/src/harfbuzz-arabic.c b/third_party/harfbuzz/src/harfbuzz-arabic.c
index ce2ca6c..af40bf8 100644
--- a/third_party/harfbuzz/src/harfbuzz-arabic.c
+++ b/third_party/harfbuzz/src/harfbuzz-arabic.c
@@ -1112,16 +1112,22 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item)
if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) {
HB_Bool ot_ok;
- if (arabicSyriacOpenTypeShape(item, &ot_ok))
+ if (arabicSyriacOpenTypeShape(item, &ot_ok)) {
+ HB_FREE_STACKARRAY(shapedChars);
return TRUE;
- if (ot_ok)
+ }
+ if (ot_ok) {
+ HB_FREE_STACKARRAY(shapedChars);
return FALSE;
/* fall through to the non OT code*/
+ }
}
#endif
- if (item->item.script != HB_Script_Arabic)
+ if (item->item.script != HB_Script_Arabic) {
+ HB_FREE_STACKARRAY(shapedChars);
return HB_BasicShape(item);
+ }
shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen,
item->item.bidiLevel % 2,
diff --git a/third_party/harfbuzz/src/harfbuzz-global.h b/third_party/harfbuzz/src/harfbuzz-global.h
index bccd6a2..d4e6b46 100644
--- a/third_party/harfbuzz/src/harfbuzz-global.h
+++ b/third_party/harfbuzz/src/harfbuzz-global.h
@@ -39,10 +39,6 @@
#define HB_END_HEADER /* nothing */
#endif
-#if defined(__GNUC__) || defined(_MSC_VER)
-#define HB_USE_PACKED_STRUCTS
-#endif
-
HB_BEGIN_HEADER
#ifndef FALSE
diff --git a/third_party/harfbuzz/src/harfbuzz-gpos.c b/third_party/harfbuzz/src/harfbuzz-gpos.c
index 7bd3b3b..e969a013 100644
--- a/third_party/harfbuzz/src/harfbuzz-gpos.c
+++ b/third_party/harfbuzz/src/harfbuzz-gpos.c
@@ -5171,13 +5171,13 @@ static HB_Error Lookup_ChainContextPos2(
if ( error )
return error;
+ if (ccpf2->MaxInputLength < 1)
+ return HB_Err_Not_Covered;
+
if ( ALLOC_ARRAY( backtrack_classes, ccpf2->MaxBacktrackLength, HB_UShort ) )
return error;
known_backtrack_classes = 0;
- if (ccpf2->MaxInputLength < 1)
- return HB_Err_Not_Covered;
-
if ( ALLOC_ARRAY( input_classes, ccpf2->MaxInputLength, HB_UShort ) )
goto End3;
known_input_classes = 1;
diff --git a/third_party/harfbuzz/src/harfbuzz-gsub.c b/third_party/harfbuzz/src/harfbuzz-gsub.c
index 21fec51..ceb7034 100644
--- a/third_party/harfbuzz/src/harfbuzz-gsub.c
+++ b/third_party/harfbuzz/src/harfbuzz-gsub.c
@@ -3158,13 +3158,13 @@ static HB_Error Lookup_ChainContextSubst2( HB_GSUBHeader* gsub,
if ( error )
return error;
+ if (ccsf2->MaxInputLength < 1)
+ return HB_Err_Not_Covered;
+
if ( ALLOC_ARRAY( backtrack_classes, ccsf2->MaxBacktrackLength, HB_UShort ) )
return error;
known_backtrack_classes = 0;
- if (ccsf2->MaxInputLength < 1)
- return HB_Err_Not_Covered;
-
if ( ALLOC_ARRAY( input_classes, ccsf2->MaxInputLength, HB_UShort ) )
goto End3;
known_input_classes = 1;
diff --git a/third_party/harfbuzz/src/harfbuzz-myanmar.c b/third_party/harfbuzz/src/harfbuzz-myanmar.c
index 1da5bbf..1a5ea3d 100644
--- a/third_party/harfbuzz/src/harfbuzz-myanmar.c
+++ b/third_party/harfbuzz/src/harfbuzz-myanmar.c
@@ -359,8 +359,8 @@ static HB_Bool myanmar_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_
if (kinzi >= 0 && i > base && (cc & Mymr_CF_AFTER_KINZI)) {
reordered[len] = Mymr_C_NGA;
reordered[len+1] = Mymr_C_VIRAMA;
- if (len > 0)
- properties[len-1] = AboveForm;
+ if (len > 0)
+ properties[len-1] = AboveForm;
properties[len] = AboveForm;
len += 2;
kinzi = -1;
diff --git a/third_party/harfbuzz/src/harfbuzz-tibetan.c b/third_party/harfbuzz/src/harfbuzz-tibetan.c
index 6f9a55b..be38ab2 100644
--- a/third_party/harfbuzz/src/harfbuzz-tibetan.c
+++ b/third_party/harfbuzz/src/harfbuzz-tibetan.c
@@ -113,6 +113,7 @@ static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_
if (item->num_glyphs < item->item.length + 4) {
item->num_glyphs = item->item.length + 4;
+ HB_FREE_STACKARRAY(reordered);
return FALSE;
}