| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* afcjk.c */ | 3 /* afcjk.c */ |
| 4 /* */ | 4 /* */ |
| 5 /* Auto-fitter hinting routines for CJK script (body). */ | 5 /* Auto-fitter hinting routines for CJK script (body). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2006-2011 by */ | 7 /* Copyright 2006-2012 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| (...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 goto Exit; | 1603 goto Exit; |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 if ( threshold < 64 ) | 1606 if ( threshold < 64 ) |
| 1607 { | 1607 { |
| 1608 if ( d_off1 >= threshold || u_off1 >= threshold || | 1608 if ( d_off1 >= threshold || u_off1 >= threshold || |
| 1609 d_off2 >= threshold || u_off2 >= threshold ) | 1609 d_off2 >= threshold || u_off2 >= threshold ) |
| 1610 goto Exit; | 1610 goto Exit; |
| 1611 } | 1611 } |
| 1612 | 1612 |
| 1613 offset = cur_len % 64; | 1613 offset = cur_len & 63; |
| 1614 | 1614 |
| 1615 if ( offset < 32 ) | 1615 if ( offset < 32 ) |
| 1616 { | 1616 { |
| 1617 if ( u_off1 <= offset || d_off2 <= offset ) | 1617 if ( u_off1 <= offset || d_off2 <= offset ) |
| 1618 goto Exit; | 1618 goto Exit; |
| 1619 } | 1619 } |
| 1620 else | 1620 else |
| 1621 offset = 64 - threshold; | 1621 offset = 64 - threshold; |
| 1622 | 1622 |
| 1623 d_off1 = threshold - u_off1; | 1623 d_off1 = threshold - u_off1; |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ), /* Tai Xuan Hing Symbols
*/ | 2218 AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ), /* Tai Xuan Hing Symbols
*/ |
| 2219 AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ), /* Enclosed Ideographic Supplement
*/ | 2219 AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ), /* Enclosed Ideographic Supplement
*/ |
| 2220 AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ), /* CJK Unified Ideographs Extensio
n B */ | 2220 AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ), /* CJK Unified Ideographs Extensio
n B */ |
| 2221 AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ), /* CJK Unified Ideographs Extensio
n C */ | 2221 AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ), /* CJK Unified Ideographs Extensio
n C */ |
| 2222 AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ), /* CJK Unified Ideographs Extensio
n D */ | 2222 AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ), /* CJK Unified Ideographs Extensio
n D */ |
| 2223 AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ), /* CJK Compatibility Ideographs Su
pplement */ | 2223 AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ), /* CJK Compatibility Ideographs Su
pplement */ |
| 2224 AF_UNIRANGE_REC( 0UL, 0UL ) | 2224 AF_UNIRANGE_REC( 0UL, 0UL ) |
| 2225 }; | 2225 }; |
| 2226 | 2226 |
| 2227 | 2227 |
| 2228 AF_DEFINE_SCRIPT_CLASS(af_cjk_script_class, | 2228 AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class, |
| 2229 AF_SCRIPT_CJK, | 2229 AF_SCRIPT_CJK, |
| 2230 af_cjk_uniranges, | 2230 af_cjk_uniranges, |
| 2231 | 2231 |
| 2232 sizeof( AF_CJKMetricsRec ), | 2232 sizeof ( AF_CJKMetricsRec ), |
| 2233 | 2233 |
| 2234 (AF_Script_InitMetricsFunc) af_cjk_metrics_init, | 2234 (AF_Script_InitMetricsFunc) af_cjk_metrics_init, |
| 2235 (AF_Script_ScaleMetricsFunc)af_cjk_metrics_scale, | 2235 (AF_Script_ScaleMetricsFunc)af_cjk_metrics_scale, |
| 2236 (AF_Script_DoneMetricsFunc) NULL, | 2236 (AF_Script_DoneMetricsFunc) NULL, |
| 2237 | 2237 |
| 2238 (AF_Script_InitHintsFunc) af_cjk_hints_init, | 2238 (AF_Script_InitHintsFunc) af_cjk_hints_init, |
| 2239 (AF_Script_ApplyHintsFunc) af_cjk_hints_apply | 2239 (AF_Script_ApplyHintsFunc) af_cjk_hints_apply |
| 2240 ) | 2240 ) |
| 2241 | 2241 |
| 2242 #else /* !AF_CONFIG_OPTION_CJK */ | 2242 #else /* !AF_CONFIG_OPTION_CJK */ |
| 2243 | 2243 |
| 2244 static const AF_Script_UniRangeRec af_cjk_uniranges[] = | 2244 static const AF_Script_UniRangeRec af_cjk_uniranges[] = |
| 2245 { | 2245 { |
| 2246 AF_UNIRANGE_REC( 0UL, 0UL ) | 2246 AF_UNIRANGE_REC( 0UL, 0UL ) |
| 2247 }; | 2247 }; |
| 2248 | 2248 |
| 2249 | 2249 |
| 2250 AF_DEFINE_SCRIPT_CLASS(af_cjk_script_class, | 2250 AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class, |
| 2251 AF_SCRIPT_CJK, | 2251 AF_SCRIPT_CJK, |
| 2252 af_cjk_uniranges, | 2252 af_cjk_uniranges, |
| 2253 | 2253 |
| 2254 sizeof( AF_CJKMetricsRec ), | 2254 sizeof ( AF_CJKMetricsRec ), |
| 2255 | 2255 |
| 2256 (AF_Script_InitMetricsFunc) NULL, | 2256 (AF_Script_InitMetricsFunc) NULL, |
| 2257 (AF_Script_ScaleMetricsFunc)NULL, | 2257 (AF_Script_ScaleMetricsFunc)NULL, |
| 2258 (AF_Script_DoneMetricsFunc) NULL, | 2258 (AF_Script_DoneMetricsFunc) NULL, |
| 2259 | 2259 |
| 2260 (AF_Script_InitHintsFunc) NULL, | 2260 (AF_Script_InitHintsFunc) NULL, |
| 2261 (AF_Script_ApplyHintsFunc) NULL | 2261 (AF_Script_ApplyHintsFunc) NULL |
| 2262 ) | 2262 ) |
| 2263 | 2263 |
| 2264 #endif /* !AF_CONFIG_OPTION_CJK */ | 2264 #endif /* !AF_CONFIG_OPTION_CJK */ |
| 2265 | 2265 |
| 2266 | 2266 |
| 2267 /* END */ | 2267 /* END */ |
| OLD | NEW |