/[freetype]/freetype2/src/sfnt/ttkern.c
ViewVC logotype

Diff of /freetype2/src/sfnt/ttkern.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by freetype, Sat Feb 26 00:12:04 2005 UTC revision 1.2 by freetype, Sun Feb 27 21:35:50 2005 UTC
# Line 175  Line 175 
175                         FT_UInt  right_glyph )                         FT_UInt  right_glyph )
176    {    {
177      FT_Int    result = 0;      FT_Int    result = 0;
     FT_Int    value;  
178      FT_UInt   count, mask = 1;      FT_UInt   count, mask = 1;
179      FT_Byte*  p       = face->kern_table;      FT_Byte*  p       = face->kern_table;
180      FT_Byte*  p_limit = p + face->kern_table_size;      FT_Byte*  p_limit = p + face->kern_table_size;
# Line 190  Line 189 
189        FT_UInt  version  = FT_NEXT_USHORT(p);        FT_UInt  version  = FT_NEXT_USHORT(p);
190        FT_UInt  length   = FT_NEXT_USHORT(p);        FT_UInt  length   = FT_NEXT_USHORT(p);
191        FT_UInt  coverage = FT_NEXT_USHORT(p);        FT_UInt  coverage = FT_NEXT_USHORT(p);
192          FT_Int   value    = 0;
193                
194        next = base + length;        next = base + length;
195                
# Line 205  Line 205 
205            {            {
206              FT_UInt   num_pairs = FT_NEXT_USHORT(p);              FT_UInt   num_pairs = FT_NEXT_USHORT(p);
207              FT_ULong  key0      = TT_KERN_INDEX(left_glyph,right_glyph);              FT_ULong  key0      = TT_KERN_INDEX(left_glyph,right_glyph);
208              FT_Int    value     = 0;  
               
209              p += 6;              p += 6;
210                            
211              if ( face->kern_order_bits & mask )   /* binary search */              if ( face->kern_order_bits & mask )   /* binary search */
# Line 226  Line 225 
225                  if ( key == key0 )                  if ( key == key0 )
226                  {                  {
227                    value = FT_PEEK_SHORT(q);                    value = FT_PEEK_SHORT(q);
228                    break;                    goto Found;
229                  }                  }
230                  if ( key < key0 )                  if ( key < key0 )
231                    min = mid+1;                    min = mid+1;
# Line 245  Line 244 
244                  if ( key == key0 )                  if ( key == key0 )
245                  {                  {
246                    value = FT_PEEK_SHORT(p);                    value = FT_PEEK_SHORT(p);
247                    break;                    goto Found;
248                  }                  }
249                  p += 2;                  p += 2;
250                }                }
# Line 261  Line 260 
260            ;            ;
261        }        }
262    
263          goto NextTable;
264          
265        Found:
266        if ( coverage & 8 ) /* overide or addition */        if ( coverage & 8 ) /* overide or addition */
267          result = value;          result = value;
268        else        else

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26