diff options
author | Werner Lemberg <wl@gnu.org> | 2002-06-22 13:35:41 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2002-06-22 13:35:41 +0000 |
commit | 9cbb166d6b18585b4a63a6ef05858b6016e05d5d (patch) | |
tree | 59d8aa2e2d4159c4f976ae552ef82b35019a7649 /src | |
parent | 0460c1d97e4f45f1b1fb1022cd6dda067d34161b (diff) |
Minor fixes. Formatting.
Diffstat (limited to 'src')
-rw-r--r-- | src/base/fttype1.c | 4 | ||||
-rw-r--r-- | src/pfr/pfrgload.c | 4 | ||||
-rw-r--r-- | src/pfr/pfrload.c | 21 | ||||
-rw-r--r-- | src/pfr/pfrobjs.c | 12 | ||||
-rw-r--r-- | src/type42/t42objs.h | 1 |
5 files changed, 24 insertions, 18 deletions
diff --git a/src/base/fttype1.c b/src/base/fttype1.c index 91dda27b..d8b18864 100644 --- a/src/base/fttype1.c +++ b/src/base/fttype1.c @@ -66,8 +66,8 @@ if ( face && face->driver && face->driver->root.clazz ) { - /* Currently, only the type1, type42 and cff drivers provide reliable */ - /* glyph names... */ + /* Currently, only the type1, type42, and cff drivers provide */ + /* reliable glyph names... */ /* We could probably hack the TrueType driver to recognize */ /* certain cases where the glyph names are most certainly */ diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index d6b60862..a914707a 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -583,8 +583,8 @@ FT_UInt format; - x_pos = 0; - y_pos = 0; + x_pos = 0; + y_pos = 0; PFR_CHECK( 1 ); format = PFR_NEXT_BYTE( p ); diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c index ec50f0a4..32c2f827 100644 --- a/src/pfr/pfrload.c +++ b/src/pfr/pfrload.c @@ -69,6 +69,7 @@ { PFR_ExtraItem extra = item_list; + for ( extra = item_list; extra->parser != NULL; extra++ ) { if ( extra->type == item_type ) @@ -506,13 +507,14 @@ FT_Byte* limit, PFR_PhyFont phy_font ) { - FT_Int count; - FT_UShort base_adj; - FT_UInt flags; - FT_UInt num_pairs; - PFR_KernPair pairs; - FT_Error error = 0; - FT_Memory memory = phy_font->memory; + FT_Int count; + FT_UShort base_adj; + FT_UInt flags; + FT_UInt num_pairs; + PFR_KernPair pairs; + FT_Error error = 0; + FT_Memory memory = phy_font->memory; + /* XXX: there may be multiple extra items for kerning */ if ( phy_font->kern_pairs != NULL ) @@ -527,7 +529,7 @@ flags = PFR_NEXT_BYTE( p ); #ifndef PFR_CONFIG_NO_CHECKS - count = 3; + count = 3; if ( flags & PFR_KERN_2BYTE_CHAR ) count += 2; @@ -573,7 +575,8 @@ Too_Short: error = PFR_Err_Invalid_Table; - FT_ERROR(( "pfr_extra_item_load_kerning_pairs: invalid kerning pairs table\n" )); + FT_ERROR(( "pfr_extra_item_load_kerning_pairs: " + "invalid kerning pairs table\n" )); goto Exit; } diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index 0d390e8e..fc764625 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -181,8 +181,8 @@ root->charmap = root->charmaps[0]; } - /* check if we've loaded any kerning pairs */ - if (phy_font->num_kern_pairs) + /* check whether we've loaded any kerning pairs */ + if ( phy_font->num_kern_pairs ) root->face_flags |= FT_FACE_FLAG_KERNING; } @@ -330,9 +330,9 @@ /*************************************************************************/ /*************************************************************************/ -/* XXX: This relies on the font being spec-conformant, i.e. that the - kerning pairs are sorted. We might want to sort it just to make - sure */ + /* XXX: This relies on the font being spec-conformant, i.e., that the + kerning pairs are sorted. We might want to sort it just to make + sure */ #undef PFR_KERN_INDEX #define PFR_KERN_INDEX( g1, g2 ) ( ( (FT_ULong)g1 << 16 ) | g2 ) @@ -348,6 +348,7 @@ PFR_KernPair min, mid, max; FT_ULong idx = PFR_KERN_INDEX( glyph1, glyph2 ); + /* simple binary search */ min = phy_font->kern_pairs; max = min + phy_font->num_kern_pairs; @@ -356,6 +357,7 @@ { FT_ULong midi; + mid = min + ( max - min ) / 2; midi = PFR_KERN_INDEX( mid->glyph1, mid->glyph2 ); diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h index ae00a333..c6ce1276 100644 --- a/src/type42/t42objs.h +++ b/src/type42/t42objs.h @@ -31,6 +31,7 @@ FT_BEGIN_HEADER + /* Type42 size */ typedef struct T42_SizeRec_ { |