OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2007,2008,2009 Red Hat, Inc. | 2 * Copyright © 2007,2008,2009 Red Hat, Inc. |
3 * | 3 * |
4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
5 * | 5 * |
6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
10 * all copies of this software. | 10 * all copies of this software. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 printf (" %d language system(s) found in script\n", num_langsys); | 124 printf (" %d language system(s) found in script\n", num_langsys); |
125 for (int n_langsys = script.has_default_lang_sys() ? -1 : 0; n_langsys
< num_langsys; n_langsys++) { | 125 for (int n_langsys = script.has_default_lang_sys() ? -1 : 0; n_langsys
< num_langsys; n_langsys++) { |
126 const LangSys &langsys = n_langsys == -1 | 126 const LangSys &langsys = n_langsys == -1 |
127 ? script.get_default_lang_sys () | 127 ? script.get_default_lang_sys () |
128 : script.get_lang_sys (n_langsys); | 128 : script.get_lang_sys (n_langsys); |
129 if (n_langsys == -1) | 129 if (n_langsys == -1) |
130 printf (" Default Language System\n"); | 130 printf (" Default Language System\n"); |
131 else | 131 else |
132 printf (" Language System %2d of %2d: %.4s\n", n_langsys, num
_langsys, | 132 printf (" Language System %2d of %2d: %.4s\n", n_langsys, num
_langsys, |
133 (const char *)script.get_lang_sys_tag (n_langsys)); | 133 (const char *)script.get_lang_sys_tag (n_langsys)); |
134 » if (langsys.get_required_feature_index () == Index::NOT_FOUND_INDEX) | 134 » if (!langsys.has_required_feature ()) |
135 printf (" No required feature\n"); | 135 printf (" No required feature\n"); |
| 136 else |
| 137 printf (" Required feature index: %d\n", |
| 138 langsys.get_required_feature_index ()); |
136 | 139 |
137 int num_features = langsys.get_feature_count (); | 140 int num_features = langsys.get_feature_count (); |
138 printf (" %d feature(s) found in language system\n", num_feat
ures); | 141 printf (" %d feature(s) found in language system\n", num_feat
ures); |
139 for (int n_feature = 0; n_feature < num_features; n_feature++) { | 142 for (int n_feature = 0; n_feature < num_features; n_feature++) { |
140 printf (" Feature index %2d of %2d: %d\n", n_feature, num_f
eatures, | 143 printf (" Feature index %2d of %2d: %d\n", n_feature, num_f
eatures, |
141 langsys.get_feature_index (n_feature)); | 144 langsys.get_feature_index (n_feature)); |
142 } | 145 } |
143 } | 146 } |
144 } | 147 } |
145 | 148 |
146 int num_features = g.get_feature_count (); | 149 int num_features = g.get_feature_count (); |
147 printf (" %d feature(s) found in table\n", num_features); | 150 printf (" %d feature(s) found in table\n", num_features); |
148 for (int n_feature = 0; n_feature < num_features; n_feature++) { | 151 for (int n_feature = 0; n_feature < num_features; n_feature++) { |
149 const Feature &feature = g.get_feature (n_feature); | 152 const Feature &feature = g.get_feature (n_feature); |
150 » printf (" Feature %2d of %2d: %.4s; %d lookup(s)\n", n_feature, num
_features, | 153 » int num_lookups = feature.get_lookup_count (); |
151 » (const char *)g.get_feature_tag(n_feature), | 154 » printf (" Feature %2d of %2d: %c%c%c%c\n", n_feature, num_features, |
152 » » feature.get_lookup_count()); | 155 » HB_UNTAG(g.get_feature_tag(n_feature))); |
153 | 156 |
154 int num_lookups = feature.get_lookup_count (); | |
155 printf (" %d lookup(s) found in feature\n", num_lookups); | 157 printf (" %d lookup(s) found in feature\n", num_lookups); |
156 for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) { | 158 for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) { |
157 printf (" Lookup index %2d of %2d: %d\n", n_lookup, num_looku
ps, | 159 printf (" Lookup index %2d of %2d: %d\n", n_lookup, num_looku
ps, |
158 feature.get_lookup_index (n_lookup)); | 160 feature.get_lookup_index (n_lookup)); |
159 } | 161 } |
160 } | 162 } |
161 | 163 |
162 int num_lookups = g.get_lookup_count (); | 164 int num_lookups = g.get_lookup_count (); |
163 printf (" %d lookup(s) found in table\n", num_lookups); | 165 printf (" %d lookup(s) found in table\n", num_lookups); |
164 for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) { | 166 for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) { |
(...skipping 23 matching lines...) Expand all Loading... |
188 break; | 190 break; |
189 } | 191 } |
190 } | 192 } |
191 } | 193 } |
192 } | 194 } |
193 | 195 |
194 return 0; | 196 return 0; |
195 } | 197 } |
196 | 198 |
197 | 199 |
OLD | NEW |