Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: src/autofit/afindic.c

Issue 89753003: Update freetype to latest version of ASOP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src/third_party/freetype.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/autofit/afindic.h ('k') | src/autofit/aflatin.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /***************************************************************************/ 1 /***************************************************************************/
2 /* */ 2 /* */
3 /* afindic.c */ 3 /* afindic.c */
4 /* */ 4 /* */
5 /* Auto-fitter hinting routines for Indic scripts (body). */ 5 /* Auto-fitter hinting routines for Indic scripts (body). */
6 /* */ 6 /* */
7 /* Copyright 2007, 2011 by */ 7 /* Copyright 2007, 2011-2013 by */
8 /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ 8 /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */
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 21 matching lines...) Expand all
39 /* skip blue zone init in CJK routines */ 39 /* skip blue zone init in CJK routines */
40 FT_CharMap oldmap = face->charmap; 40 FT_CharMap oldmap = face->charmap;
41 41
42 42
43 metrics->units_per_em = face->units_per_EM; 43 metrics->units_per_em = face->units_per_EM;
44 44
45 if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) ) 45 if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
46 face->charmap = NULL; 46 face->charmap = NULL;
47 else 47 else
48 { 48 {
49 af_cjk_metrics_init_widths( metrics, face, 0x7530 ); 49 af_cjk_metrics_init_widths( metrics, face );
50 #if 0 50 #if 0
51 /* either need indic specific blue_chars[] or just skip blue zones */ 51 /* either need indic specific blue_chars[] or just skip blue zones */
52 af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars ); 52 af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars );
53 #endif 53 #endif
54 af_cjk_metrics_check_digits( metrics, face ); 54 af_cjk_metrics_check_digits( metrics, face );
55 } 55 }
56 56
57 FT_Set_Charmap( face, oldmap ); 57 FT_Set_Charmap( face, oldmap );
58 58
59 return AF_Err_Ok; 59 return FT_Err_Ok;
60 } 60 }
61 61
62 62
63 static void 63 static void
64 af_indic_metrics_scale( AF_CJKMetrics metrics, 64 af_indic_metrics_scale( AF_CJKMetrics metrics,
65 AF_Scaler scaler ) 65 AF_Scaler scaler )
66 { 66 {
67 /* use CJK routines */ 67 /* use CJK routines */
68 af_cjk_metrics_scale( metrics, scaler ); 68 af_cjk_metrics_scale( metrics, scaler );
69 } 69 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL), /* Meetei Mayak */ 109 AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL), /* Meetei Mayak */
110 AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL), /* Syloti Nagri */ 110 AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL), /* Syloti Nagri */
111 AF_UNIRANGE_REC( 0x11800UL, 0x118DFUL), /* Sharada */ 111 AF_UNIRANGE_REC( 0x11800UL, 0x118DFUL), /* Sharada */
112 AF_UNIRANGE_REC( 0UL, 0UL) 112 AF_UNIRANGE_REC( 0UL, 0UL)
113 }; 113 };
114 114
115 115
116 AF_DEFINE_SCRIPT_CLASS( af_indic_script_class, 116 AF_DEFINE_SCRIPT_CLASS( af_indic_script_class,
117 AF_SCRIPT_INDIC, 117 AF_SCRIPT_INDIC,
118 af_indic_uniranges, 118 af_indic_uniranges,
119 'o', /* XXX */
119 120
120 sizeof ( AF_CJKMetricsRec ), 121 sizeof ( AF_CJKMetricsRec ),
121 122
122 (AF_Script_InitMetricsFunc) af_indic_metrics_init, 123 (AF_Script_InitMetricsFunc) af_indic_metrics_init,
123 (AF_Script_ScaleMetricsFunc)af_indic_metrics_scale, 124 (AF_Script_ScaleMetricsFunc)af_indic_metrics_scale,
124 (AF_Script_DoneMetricsFunc) NULL, 125 (AF_Script_DoneMetricsFunc) NULL,
125 126
126 (AF_Script_InitHintsFunc) af_indic_hints_init, 127 (AF_Script_InitHintsFunc) af_indic_hints_init,
127 (AF_Script_ApplyHintsFunc) af_indic_hints_apply 128 (AF_Script_ApplyHintsFunc) af_indic_hints_apply
128 ) 129 )
129 130
130 #else /* !AF_CONFIG_OPTION_INDIC */ 131 #else /* !AF_CONFIG_OPTION_INDIC */
131 132
132 static const AF_Script_UniRangeRec af_indic_uniranges[] = 133 static const AF_Script_UniRangeRec af_indic_uniranges[] =
133 { 134 {
134 { 0, 0 } 135 { 0, 0 }
135 }; 136 };
136 137
137 138
138 AF_DEFINE_SCRIPT_CLASS( af_indic_script_class, 139 AF_DEFINE_SCRIPT_CLASS( af_indic_script_class,
139 AF_SCRIPT_INDIC, 140 AF_SCRIPT_INDIC,
140 af_indic_uniranges, 141 af_indic_uniranges,
142 0,
141 143
142 sizeof ( AF_CJKMetricsRec ), 144 sizeof ( AF_CJKMetricsRec ),
143 145
144 (AF_Script_InitMetricsFunc) NULL, 146 (AF_Script_InitMetricsFunc) NULL,
145 (AF_Script_ScaleMetricsFunc)NULL, 147 (AF_Script_ScaleMetricsFunc)NULL,
146 (AF_Script_DoneMetricsFunc) NULL, 148 (AF_Script_DoneMetricsFunc) NULL,
147 149
148 (AF_Script_InitHintsFunc) NULL, 150 (AF_Script_InitHintsFunc) NULL,
149 (AF_Script_ApplyHintsFunc) NULL 151 (AF_Script_ApplyHintsFunc) NULL
150 ) 152 )
151 153
152 #endif /* !AF_CONFIG_OPTION_INDIC */ 154 #endif /* !AF_CONFIG_OPTION_INDIC */
153 155
154 156
155 /* END */ 157 /* END */
OLDNEW
« no previous file with comments | « src/autofit/afindic.h ('k') | src/autofit/aflatin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698