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; |
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 |
|
|
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 */ |
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; |
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 |
} |
} |
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 |