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/pfr/pfrobjs.c | |
parent | 0460c1d97e4f45f1b1fb1022cd6dda067d34161b (diff) |
Minor fixes. Formatting.
Diffstat (limited to 'src/pfr/pfrobjs.c')
-rw-r--r-- | src/pfr/pfrobjs.c | 12 |
1 files changed, 7 insertions, 5 deletions
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 ); |