OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* aflatin.c */ | 3 /* aflatin.c */ |
4 /* */ | 4 /* */ |
5 /* Auto-fitter hinting routines for latin writing system (body). */ | 5 /* Auto-fitter hinting routines for latin writing system (body). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2003-2014 by */ | 7 /* Copyright 2003-2014 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, */ |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 /* load the character in the face -- skip unknown or empty ones */ | 355 /* load the character in the face -- skip unknown or empty ones */ |
356 af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); | 356 af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); |
357 if ( glyph_index == 0 ) | 357 if ( glyph_index == 0 ) |
358 { | 358 { |
359 FT_TRACE5(( " U+%04lX unavailable\n", ch )); | 359 FT_TRACE5(( " U+%04lX unavailable\n", ch )); |
360 continue; | 360 continue; |
361 } | 361 } |
362 | 362 |
363 error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); | 363 error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); |
364 outline = face->glyph->outline; | 364 outline = face->glyph->outline; |
365 if ( error || outline.n_points <= 0 ) | 365 /* reject glyphs that don't produce any rendering */ |
| 366 if ( error || outline.n_points <= 2 ) |
366 { | 367 { |
367 FT_TRACE5(( " U+%04lX contains no outlines\n", ch )); | 368 FT_TRACE5(( " U+%04lX contains no (usable) outlines\n", ch )); |
368 continue; | 369 continue; |
369 } | 370 } |
370 | 371 |
371 /* now compute min or max point indices and coordinates */ | 372 /* now compute min or max point indices and coordinates */ |
372 points = outline.points; | 373 points = outline.points; |
373 best_point = -1; | 374 best_point = -1; |
374 best_y = 0; /* make compiler happy */ | 375 best_y = 0; /* make compiler happy */ |
375 best_contour_first = 0; /* ditto */ | 376 best_contour_first = 0; /* ditto */ |
376 best_contour_last = 0; /* ditto */ | 377 best_contour_last = 0; /* ditto */ |
377 | 378 |
(...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2902 (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init, | 2903 (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init, |
2903 (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale, | 2904 (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale, |
2904 (AF_WritingSystem_DoneMetricsFunc) NULL, | 2905 (AF_WritingSystem_DoneMetricsFunc) NULL, |
2905 | 2906 |
2906 (AF_WritingSystem_InitHintsFunc) af_latin_hints_init, | 2907 (AF_WritingSystem_InitHintsFunc) af_latin_hints_init, |
2907 (AF_WritingSystem_ApplyHintsFunc) af_latin_hints_apply | 2908 (AF_WritingSystem_ApplyHintsFunc) af_latin_hints_apply |
2908 ) | 2909 ) |
2909 | 2910 |
2910 | 2911 |
2911 /* END */ | 2912 /* END */ |
OLD | NEW |