| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ttkern.c */ | 3 /* ttkern.c */ |
| 4 /* */ | 4 /* */ |
| 5 /* Load the basic TrueType kerning table. This doesn't handle */ | 5 /* Load the basic TrueType kerning table. This doesn't handle */ |
| 6 /* kerning data within the GPOS table at the moment. */ | 6 /* kerning data within the GPOS table at the moment. */ |
| 7 /* */ | 7 /* */ |
| 8 /* Copyright 1996-2007, 2009, 2010, 2013 by */ | 8 /* Copyright 1996-2015 by */ |
| 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 10 /* */ | 10 /* */ |
| 11 /* This file is part of the FreeType project, and may only be used, */ | 11 /* This file is part of the FreeType project, and may only be used, */ |
| 12 /* modified, and distributed under the terms of the FreeType project */ | 12 /* modified, and distributed under the terms of the FreeType project */ |
| 13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 14 /* this file you indicate that you have read the license and */ | 14 /* this file you indicate that you have read the license and */ |
| 15 /* understand and accept it fully. */ | 15 /* understand and accept it fully. */ |
| 16 /* */ | 16 /* */ |
| 17 /***************************************************************************/ | 17 /***************************************************************************/ |
| 18 | 18 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 if ( length <= 6 + 8 ) | 102 if ( length <= 6 + 8 ) |
| 103 break; | 103 break; |
| 104 | 104 |
| 105 p_next += length; | 105 p_next += length; |
| 106 | 106 |
| 107 if ( p_next > p_limit ) /* handle broken table */ | 107 if ( p_next > p_limit ) /* handle broken table */ |
| 108 p_next = p_limit; | 108 p_next = p_limit; |
| 109 | 109 |
| 110 /* only use horizontal kerning tables */ | 110 /* only use horizontal kerning tables */ |
| 111 if ( ( coverage & ~8 ) != 0x0001 || | 111 if ( ( coverage & ~8U ) != 0x0001 || |
| 112 p + 8 > p_limit ) | 112 p + 8 > p_limit ) |
| 113 goto NextTable; | 113 goto NextTable; |
| 114 | 114 |
| 115 num_pairs = FT_NEXT_USHORT( p ); | 115 num_pairs = FT_NEXT_USHORT( p ); |
| 116 p += 6; | 116 p += 6; |
| 117 | 117 |
| 118 if ( ( p_next - p ) < 6 * (int)num_pairs ) /* handle broken count */ | 118 if ( ( p_next - p ) < 6 * (int)num_pairs ) /* handle broken count */ |
| 119 num_pairs = (FT_UInt)( ( p_next - p ) / 6 ); | 119 num_pairs = (FT_UInt)( ( p_next - p ) / 6 ); |
| 120 | 120 |
| 121 avail |= mask; | 121 avail |= mask; |
| 122 | 122 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 NextTable: | 297 NextTable: |
| 298 p = next; | 298 p = next; |
| 299 } | 299 } |
| 300 | 300 |
| 301 return result; | 301 return result; |
| 302 } | 302 } |
| 303 | 303 |
| 304 #undef TT_KERN_INDEX | 304 #undef TT_KERN_INDEX |
| 305 | 305 |
| 306 /* END */ | 306 /* END */ |
| OLD | NEW |