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

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

Issue 1111803003: Locally apply upstream patch to fix crbug.com/394373 (Closed) Base URL: https://chromium.googlesource.com/chromium/src/third_party/freetype.git@master
Patch Set: Rebase Created 5 years, 7 months 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 | « README.chromium ('k') | no next file » | 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 /* 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
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
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 */
OLDNEW
« no previous file with comments | « README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698