* src/truetype/ttgload.c (TT_Load_Glyph): Consolidate flag setting.

This commit is contained in:
Alexei Podtelezhnikov 2025-01-03 22:54:20 -05:00
parent 5245fd69fd
commit 81330e1f8a
1 changed files with 7 additions and 8 deletions

View File

@ -2639,6 +2639,13 @@
glyph->outline = loader.gloader->base.outline;
glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
/* Set the `high precision' bit flag. This is _critical_ to */
/* get correct output for monochrome TrueType glyphs at all */
/* sizes using the bytecode interpreter. */
if ( !( load_flags & FT_LOAD_NO_SCALE ) &&
size->metrics->y_ppem < 24 )
glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
/* Translate array so that (0,0) is the glyph's origin. Note */
/* that this behaviour is independent on the value of bit 1 of */
/* the `flags' field in the `head' table -- at least major */
@ -2687,14 +2694,6 @@
error = compute_glyph_metrics( &loader, glyph_index );
}
/* Set the `high precision' bit flag. */
/* This is _critical_ to get correct output for monochrome */
/* TrueType glyphs at all sizes using the bytecode interpreter. */
/* */
if ( !( load_flags & FT_LOAD_NO_SCALE ) &&
size->metrics->y_ppem < 24 )
glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
FT_TRACE1(( " subglyphs = %u, contours = %hu, points = %hu,"
" flags = 0x%.3x\n",
loader.gloader->base.num_subglyphs,