|
|
|
@ -198,8 +198,8 @@ |
|
|
|
|
/* 'af_latin2_blue_chars[blues]' string, then compute its top-most or */ |
|
|
|
|
/* bottom-most points (depending on `AF_IS_TOP_BLUE') */ |
|
|
|
|
|
|
|
|
|
FT_TRACE5(( "blue zones computation\n" )); |
|
|
|
|
FT_TRACE5(( "------------------------------------------------\n" )); |
|
|
|
|
FT_TRACE5(( "blue zones computation\n" |
|
|
|
|
"======================\n\n" )); |
|
|
|
|
|
|
|
|
|
for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ ) |
|
|
|
|
{ |
|
|
|
@ -209,7 +209,7 @@ |
|
|
|
|
FT_Pos* blue_shoot; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_TRACE5(( "blue %3d: ", bb )); |
|
|
|
|
FT_TRACE5(( "blue zone %d:\n", bb )); |
|
|
|
|
|
|
|
|
|
num_flats = 0; |
|
|
|
|
num_rounds = 0; |
|
|
|
@ -222,8 +222,6 @@ |
|
|
|
|
FT_Bool round; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_TRACE5(( "'%c'", *p )); |
|
|
|
|
|
|
|
|
|
/* load the character in the face -- skip unknown or empty ones */ |
|
|
|
|
glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p ); |
|
|
|
|
if ( glyph_index == 0 ) |
|
|
|
@ -285,7 +283,7 @@ |
|
|
|
|
best_last = last; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
FT_TRACE5(( "%5d", best_y )); |
|
|
|
|
FT_TRACE5(( " %c %d", *p, best_y )); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* now check whether the point belongs to a straight or round */ |
|
|
|
@ -333,7 +331,7 @@ |
|
|
|
|
FT_CURVE_TAG( glyph->outline.tags[start] ) != FT_CURVE_TAG_ON || |
|
|
|
|
FT_CURVE_TAG( glyph->outline.tags[ end ] ) != FT_CURVE_TAG_ON ); |
|
|
|
|
|
|
|
|
|
FT_TRACE5(( "%c ", round ? 'r' : 'f' )); |
|
|
|
|
FT_TRACE5(( " (%s)\n", round ? "round" : "flat" )); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( round ) |
|
|
|
@ -342,15 +340,13 @@ |
|
|
|
|
flats[num_flats++] = best_y; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FT_TRACE5(( "\n" )); |
|
|
|
|
|
|
|
|
|
if ( num_flats == 0 && num_rounds == 0 ) |
|
|
|
|
{ |
|
|
|
|
/*
|
|
|
|
|
* we couldn't find a single glyph to compute this blue zone, |
|
|
|
|
* we will simply ignore it then |
|
|
|
|
*/ |
|
|
|
|
FT_TRACE5(( "empty\n" )); |
|
|
|
|
FT_TRACE5(( " empty\n" )); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -393,7 +389,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref ) |
|
|
|
|
*blue_shoot = *blue_ref = ( shoot + ref ) / 2; |
|
|
|
|
{ |
|
|
|
|
*blue_ref = |
|
|
|
|
*blue_shoot = ( shoot + ref ) / 2; |
|
|
|
|
|
|
|
|
|
FT_TRACE5(( " [overshoot smaller than reference," |
|
|
|
|
" taking mean value]\n" )); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
blue->flags = 0; |
|
|
|
@ -408,7 +410,9 @@ |
|
|
|
|
if ( bb == AF_LATIN_BLUE_SMALL_TOP ) |
|
|
|
|
blue->flags |= AF_LATIN_BLUE_ADJUSTMENT; |
|
|
|
|
|
|
|
|
|
FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot )); |
|
|
|
|
FT_TRACE5(( " -> reference = %ld\n" |
|
|
|
|
" overshoot = %ld\n", |
|
|
|
|
*blue_ref, *blue_shoot )); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|