[HarfBuzz] harfbuzz: Branch 'pango' - 7 commits
Simon Hausmann
hausmann at kemper.freedesktop.org
Sun Aug 26 06:06:25 PDT 2007
pango/pango-harfbuzz.c | 6 ++----
src/harfbuzz-gpos.c | 15 ++++++++++-----
src/harfbuzz-gsub.c | 2 +-
src/harfbuzz-shaper.cpp | 8 ++++----
4 files changed, 17 insertions(+), 14 deletions(-)
New commits:
diff-tree 10e195914fc3fef80dcfb49e58995df23aaa5900 (from 26dcf6313ee074c7f068103a0d9a24fff682c27d)
Author: Simon Hausmann <shausman at trolltech.com>
Date: Sun Aug 26 14:59:02 2007 +0200
Use g_unichar_combining_class to determine the combining class for a given character.
Thanks to Behdad for pointing out this one :)
diff --git a/pango/pango-harfbuzz.c b/pango/pango-harfbuzz.c
index de20b2a..262a72e 100644
--- a/pango/pango-harfbuzz.c
+++ b/pango/pango-harfbuzz.c
@@ -522,15 +522,13 @@ HB_CharCategory HB_GetUnicodeCharCategor
int HB_GetUnicodeCharCombiningClass(HB_UChar32 ch)
{
- /* #### FIXME */
- return 0;
+ return g_unichar_combining_class(ch);
}
void HB_GetUnicodeCharProperties(HB_UChar32 ch, HB_CharCategory *category, int *combiningClass)
{
*category = charCategoryMap[g_unichar_type(ch)];
- /* ### FIXME */
- *combiningClass = 0;
+ *combiningClass = g_unichar_combining_class(ch);
}
diff-tree 26dcf6313ee074c7f068103a0d9a24fff682c27d (from parents)
Merge: 74e386e6cbc73be158d731422b7bf737d70d276e 2c4b930605c1660dd3843117b0d729fcf386bcab
Author: Simon Hausmann <shausman at trolltech.com>
Date: Sun Aug 26 15:04:49 2007 +0200
Merge branch 'master' into pango
diff-tree 2c4b930605c1660dd3843117b0d729fcf386bcab (from parents)
Merge: 5ae52c37acc729d7927d003170de8dcfb8d951cf 8dd0a6c211b32705af991a93fe15803d5bd5d921
Author: Simon Hausmann <shausman at trolltech.com>
Date: Sun Aug 26 15:04:12 2007 +0200
Merge branch 'stable'
Conflicts:
src/harfbuzz-gpos.c
src/harfbuzz-gsub.c
diff --cc src/harfbuzz-gpos.c
index 2e3c211,6f0476a..8da4540
@@@ -1458,16 -1515,16 +1458,16 @@@
}
-static FT_Error Lookup_PairPos1( GPOS_Instance* gpi,
+static HB_Error Lookup_PairPos1( GPOS_Instance* gpi,
HB_PairPosFormat1* ppf1,
HB_Buffer buffer,
- HB_UShort first_pos,
- FT_ULong first_pos,
- FT_UShort index,
- FT_UShort format1,
- FT_UShort format2 )
++ HB_UInt first_pos,
+ HB_UShort index,
+ HB_UShort format1,
+ HB_UShort format2 )
{
- FT_Error error;
- FT_UShort numpvr, glyph2;
+ HB_Error error;
+ HB_UShort numpvr, glyph2;
HB_PairValueRecord* pvr;
@@@ -1500,15 -1557,15 +1500,15 @@@
}
-static FT_Error Lookup_PairPos2( GPOS_Instance* gpi,
+static HB_Error Lookup_PairPos2( GPOS_Instance* gpi,
HB_PairPosFormat2* ppf2,
HB_Buffer buffer,
- HB_UShort first_pos,
- FT_ULong first_pos,
- FT_UShort format1,
- FT_UShort format2 )
++ HB_UInt first_pos,
+ HB_UShort format1,
+ HB_UShort format2 )
{
- FT_Error error;
- FT_UShort cl1, cl2;
+ HB_Error error;
+ HB_UShort cl1, cl2;
HB_Class1Record* c1r;
HB_Class2Record* c2r;
@@@ -1535,15 -1592,16 +1535,16 @@@
}
-static FT_Error Lookup_PairPos( GPOS_Instance* gpi,
+static HB_Error Lookup_PairPos( GPOS_Instance* gpi,
HB_GPOS_SubTable* st,
HB_Buffer buffer,
- FT_UShort flags,
- FT_UShort context_length,
+ HB_UShort flags,
+ HB_UShort context_length,
int nesting_level )
{
- FT_Error error;
- FT_UShort index, property;
- FT_ULong first_pos;
+ HB_Error error;
- HB_UShort index, property, first_pos;
++ HB_UShort index, property;
++ HB_UInt first_pos;
HB_GPOSHeader* gpos = gpi->gpos;
HB_PairPos* pp = &st->pair;
@@@ -3063,8 -3141,8 +3068,8 @@@
HB_Buffer buffer,
int nesting_level )
{
- FT_Error error;
- FT_ULong i, old_pos;
+ HB_Error error;
- HB_UShort i, old_pos;
++ HB_UInt i, old_pos;
i = 0;
diff --cc src/harfbuzz-gsub.c
index 427385c,23b87b8..5cdd801
@@@ -1088,8 -1129,8 +1088,8 @@@
HB_Buffer buffer,
int nesting_level )
{
- FT_Error error;
- FT_ULong i, old_pos;
+ HB_Error error;
- HB_UShort i, old_pos;
++ HB_UInt i, old_pos;
i = 0;
diff-tree 74e386e6cbc73be158d731422b7bf737d70d276e (from 16003099e026506a562426ea574e2016a55a4b07)
Author: Simon Hausmann <simon at scruffy.troll.no>
Date: Wed Aug 1 12:59:25 2007 +0200
Use unsigned int instead of uint to compile on OS X.
diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
index d289a77..a08d570 100644
--- a/src/harfbuzz-shaper.cpp
+++ b/src/harfbuzz-shaper.cpp
@@ -726,7 +726,7 @@ static HB_Bool checkScript(HB_Face face,
if (!face->gsub && !face->gpos)
return false;
- uint tag = ot_scripts[script].tag;
+ unsigned int tag = ot_scripts[script].tag;
int requirements = ot_scripts[script].flags;
if (requirements & RequiresGsub) {
@@ -831,7 +831,7 @@ HB_Face HB_NewFace(void *font, HB_GetFon
HB_close_stream(gdefStream);
- for (uint i = 0; i < HB_ScriptCount; ++i)
+ for (unsigned int i = 0; i < HB_ScriptCount; ++i)
face->supported_scripts[i] = checkScript(face, i);
hb_buffer_new(&face->buffer);
@@ -874,7 +874,7 @@ HB_Bool HB_SelectScript(HB_ShaperItem *s
assert(script < HB_ScriptCount);
// find script in our list of supported scripts.
- uint tag = ot_scripts[script].tag;
+ unsigned int tag = ot_scripts[script].tag;
if (face->gsub && features) {
#ifdef OT_DEBUG
@@ -982,7 +982,7 @@ HB_Bool HB_OpenTypeShape(HB_ShaperItem *
face->glyphs_substituted = false;
if (face->gsub) {
- uint error = HB_GSUB_Apply_String(face->gsub, face->buffer);
+ unsigned int error = HB_GSUB_Apply_String(face->gsub, face->buffer);
if (error && error != HB_Err_Not_Covered)
return false;
face->glyphs_substituted = (error != HB_Err_Not_Covered);
diff-tree 8dd0a6c211b32705af991a93fe15803d5bd5d921 (from f2acc48e352c09c6c8f714c1e24ca5bc490da113)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Aug 26 14:43:27 2007 +0200
[HarfBuzz] Another fix
The actual fix for this bug now:
        http://bugzilla.gnome.org/show_bug.cgi?id=463430
The bug was that an intermediate index variable was of type FT_UShort
and overflowing with more than 65536 input glyphs. Â Yikes! Â Patch
attached.
diff --git a/src/harfbuzz-gpos.c b/src/harfbuzz-gpos.c
index 513f3fb..6f0476a 100644
--- a/src/harfbuzz-gpos.c
+++ b/src/harfbuzz-gpos.c
@@ -1518,7 +1518,7 @@ static void Free_PairPos( HB_GPOS_SubTa
static FT_Error Lookup_PairPos1( GPOS_Instance* gpi,
HB_PairPosFormat1* ppf1,
HB_Buffer buffer,
- FT_UShort first_pos,
+ FT_ULong first_pos,
FT_UShort index,
FT_UShort format1,
FT_UShort format2 )
@@ -1560,7 +1560,7 @@ static FT_Error Lookup_PairPos1( GPOS_I
static FT_Error Lookup_PairPos2( GPOS_Instance* gpi,
HB_PairPosFormat2* ppf2,
HB_Buffer buffer,
- FT_UShort first_pos,
+ FT_ULong first_pos,
FT_UShort format1,
FT_UShort format2 )
{
@@ -1600,7 +1600,8 @@ static FT_Error Lookup_PairPos( GPOS_In
int nesting_level )
{
FT_Error error;
- FT_UShort index, property, first_pos;
+ FT_UShort index, property;
+ FT_ULong first_pos;
HB_GPOSHeader* gpos = gpi->gpos;
HB_PairPos* pp = &st->pair;
@@ -1631,8 +1632,12 @@ static FT_Error Lookup_PairPos( GPOS_In
return error;
if ( buffer->in_pos == buffer->in_length )
- return HB_Err_Not_Covered;
+ {
+ buffer->in_pos = first_pos;
+ return HB_Err_Not_Covered;
+ }
(buffer->in_pos)++;
+
}
switch ( pp->PosFormat )
@@ -3137,7 +3142,7 @@ static FT_Error Do_ContextPos( GPOS_Ins
int nesting_level )
{
FT_Error error;
- FT_UShort i, old_pos;
+ FT_ULong i, old_pos;
i = 0;
diff --git a/src/harfbuzz-gsub.c b/src/harfbuzz-gsub.c
index 00db6e8..23b87b8 100644
--- a/src/harfbuzz-gsub.c
+++ b/src/harfbuzz-gsub.c
@@ -1130,7 +1130,7 @@ static FT_Error Do_ContextSubst( HB_GSU
int nesting_level )
{
FT_Error error;
- FT_UShort i, old_pos;
+ FT_ULong i, old_pos;
i = 0;
diff-tree 5ae52c37acc729d7927d003170de8dcfb8d951cf (from parents)
Merge: 596d178b6241ce0fd7c7b59ccc340e0ffb4162d2 23c738a0b247e382f086b4388d5f9d4b7159b986
Author: Simon Hausmann <shausman at trolltech.com>
Date: Tue Aug 21 09:04:12 2007 +0200
Merge branch 'master' of git+ssh://git.freedesktop.org/git/harfbuzz
diff-tree 23c738a0b247e382f086b4388d5f9d4b7159b986 (from d34bcf298bb999e84d75df9d8ad35366a44ceb80)
Author: Simon Hausmann <simon at scruffy.troll.no>
Date: Wed Aug 1 12:59:25 2007 +0200
Use unsigned int instead of uint to compile on OS X.
diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
index d289a77..a08d570 100644
--- a/src/harfbuzz-shaper.cpp
+++ b/src/harfbuzz-shaper.cpp
@@ -726,7 +726,7 @@ static HB_Bool checkScript(HB_Face face,
if (!face->gsub && !face->gpos)
return false;
- uint tag = ot_scripts[script].tag;
+ unsigned int tag = ot_scripts[script].tag;
int requirements = ot_scripts[script].flags;
if (requirements & RequiresGsub) {
@@ -831,7 +831,7 @@ HB_Face HB_NewFace(void *font, HB_GetFon
HB_close_stream(gdefStream);
- for (uint i = 0; i < HB_ScriptCount; ++i)
+ for (unsigned int i = 0; i < HB_ScriptCount; ++i)
face->supported_scripts[i] = checkScript(face, i);
hb_buffer_new(&face->buffer);
@@ -874,7 +874,7 @@ HB_Bool HB_SelectScript(HB_ShaperItem *s
assert(script < HB_ScriptCount);
// find script in our list of supported scripts.
- uint tag = ot_scripts[script].tag;
+ unsigned int tag = ot_scripts[script].tag;
if (face->gsub && features) {
#ifdef OT_DEBUG
@@ -982,7 +982,7 @@ HB_Bool HB_OpenTypeShape(HB_ShaperItem *
face->glyphs_substituted = false;
if (face->gsub) {
- uint error = HB_GSUB_Apply_String(face->gsub, face->buffer);
+ unsigned int error = HB_GSUB_Apply_String(face->gsub, face->buffer);
if (error && error != HB_Err_Not_Covered)
return false;
face->glyphs_substituted = (error != HB_Err_Not_Covered);
More information about the HarfBuzz
mailing list