mirror of
https://github.com/openjdk/jdk15u.git
synced 2025-12-10 17:33:04 -06:00
8290334: Update FreeType to 2.12.1
Backport-of: ea8b75cfe453f5806a96ca85dd5e31724750a88f
This commit is contained in:
parent
b1b326016c
commit
2d66d12721
@ -1,4 +1,4 @@
|
||||
## The FreeType Project: Freetype v2.12.0
|
||||
## The FreeType Project: Freetype v2.12.1
|
||||
|
||||
|
||||
### FreeType Notice
|
||||
|
||||
@ -4942,7 +4942,7 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 12
|
||||
#define FREETYPE_PATCH 0
|
||||
#define FREETYPE_PATCH 1
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
||||
@ -528,14 +528,14 @@ FT_BEGIN_HEADER
|
||||
* @fields:
|
||||
* num_color_stops ::
|
||||
* The number of color stops for the requested glyph index. Set by
|
||||
* @FT_Get_Colorline_Stops.
|
||||
* @FT_Get_Paint.
|
||||
*
|
||||
* current_color_stop ::
|
||||
* The current color stop. Set by @FT_Get_Colorline_Stops.
|
||||
*
|
||||
* p ::
|
||||
* An opaque pointer into 'COLR' table data. The caller must set this
|
||||
* to `NULL` before the first call of @FT_Get_Colorline_Stops.
|
||||
* An opaque pointer into 'COLR' table data. Set by @FT_Get_Paint.
|
||||
* Updated by @FT_Get_Colorline_Stops.
|
||||
*
|
||||
* @since:
|
||||
* 2.11 -- **currently experimental only!** There might be changes
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
NULL, NULL, NULL ) )
|
||||
return ( OSType ) 0;
|
||||
|
||||
return ((FInfo *)(info.finderInfo))->fdType;
|
||||
return ( (FInfo *)( info.finderInfo ) )->fdType;
|
||||
}
|
||||
|
||||
|
||||
@ -462,7 +462,7 @@
|
||||
|
||||
if ( ps_name_len != 0 )
|
||||
{
|
||||
ft_memcpy(ps_name, names[0] + 1, ps_name_len);
|
||||
ft_memcpy( ps_name, names[0] + 1, ps_name_len );
|
||||
ps_name[ps_name_len] = 0;
|
||||
}
|
||||
if ( style->indexes[face_index] > 1 &&
|
||||
|
||||
@ -402,17 +402,17 @@
|
||||
FT_Long *result_offset );
|
||||
|
||||
|
||||
CONST_FT_RFORK_RULE_ARRAY_BEGIN(ft_raccess_guess_table,
|
||||
ft_raccess_guess_rec)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_double, apple_double)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_single, apple_single)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_ufs_export, darwin_ufs_export)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_newvfs, darwin_newvfs)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_hfsplus, darwin_hfsplus)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(vfat, vfat)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_cap, linux_cap)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_double, linux_double)
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_netatalk, linux_netatalk)
|
||||
CONST_FT_RFORK_RULE_ARRAY_BEGIN( ft_raccess_guess_table,
|
||||
ft_raccess_guess_rec )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_double, apple_double )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_single, apple_single )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_ufs_export, darwin_ufs_export )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_newvfs, darwin_newvfs )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_hfsplus, darwin_hfsplus )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( vfat, vfat )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_cap, linux_cap )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_double, linux_double )
|
||||
CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_netatalk, linux_netatalk )
|
||||
CONST_FT_RFORK_RULE_ARRAY_END
|
||||
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
|
||||
if ( char_code < 255 )
|
||||
{
|
||||
FT_UInt code = (FT_UInt)(char_code + 1);
|
||||
FT_UInt code = (FT_UInt)( char_code + 1 );
|
||||
|
||||
|
||||
for (;;)
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
{
|
||||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
CFF_Font cff = (CFF_Font)( face->extra.data );
|
||||
|
||||
|
||||
return cff_index_access_element( &cff->charstrings_index, glyph_index,
|
||||
@ -111,7 +111,7 @@
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
{
|
||||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
CFF_Font cff = (CFF_Font)( face->extra.data );
|
||||
|
||||
|
||||
cff_index_forget_element( &cff->charstrings_index, pointer );
|
||||
@ -370,8 +370,8 @@
|
||||
SFNT_Service sfnt;
|
||||
|
||||
|
||||
if ( size->root.metrics.x_ppem < 1 ||
|
||||
size->root.metrics.y_ppem < 1 )
|
||||
if ( size && (size->root.metrics.x_ppem < 1 ||
|
||||
size->root.metrics.y_ppem < 1 ) )
|
||||
{
|
||||
error = FT_THROW( Invalid_Size_Handle );
|
||||
return error;
|
||||
|
||||
@ -248,7 +248,7 @@
|
||||
else
|
||||
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
|
||||
{
|
||||
CFF_Font cff = (CFF_Font)(face->extra.data);
|
||||
CFF_Font cff = (CFF_Font)( face->extra.data );
|
||||
|
||||
|
||||
bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
|
||||
|
||||
@ -535,11 +535,11 @@
|
||||
|
||||
if ( r & 1 )
|
||||
{
|
||||
*buffer = (FT_Byte)(*buffer + c);
|
||||
*buffer = (FT_Byte)( *buffer + c );
|
||||
buffer++;
|
||||
}
|
||||
else
|
||||
*buffer = (FT_Byte)(c << 4);
|
||||
*buffer = (FT_Byte)( c << 4 );
|
||||
|
||||
r++;
|
||||
}
|
||||
@ -572,8 +572,8 @@
|
||||
if ( p >= limit )
|
||||
return 0;
|
||||
|
||||
if ( n > (FT_UInt)(limit - p) )
|
||||
n = (FT_UInt)(limit - p);
|
||||
if ( n > (FT_UInt)( limit - p ) )
|
||||
n = (FT_UInt)( limit - p );
|
||||
|
||||
for ( r = 0; r < n; r++ )
|
||||
{
|
||||
|
||||
@ -518,7 +518,7 @@
|
||||
|
||||
if ( *cur == '<' ) /* <...> */
|
||||
{
|
||||
if ( cur + 1 < limit && *(cur + 1) == '<' ) /* << */
|
||||
if ( cur + 1 < limit && *( cur + 1 ) == '<' ) /* << */
|
||||
{
|
||||
cur++;
|
||||
cur++;
|
||||
|
||||
@ -2269,7 +2269,7 @@
|
||||
/* This is due to the fact that, in the vast majority of cases, */
|
||||
/* the span length in bytes is relatively small. */
|
||||
while ( --c2 > 0 )
|
||||
*(++target) = 0xFF;
|
||||
*( ++target ) = 0xFF;
|
||||
|
||||
target[1] |= f2;
|
||||
}
|
||||
|
||||
@ -367,7 +367,7 @@
|
||||
}
|
||||
|
||||
/* transform transparency to alpha */
|
||||
if ( png_get_valid(png, info, PNG_INFO_tRNS ) )
|
||||
if ( png_get_valid( png, info, PNG_INFO_tRNS ) )
|
||||
png_set_tRNS_to_alpha( png );
|
||||
|
||||
if ( bitdepth == 16 )
|
||||
@ -387,7 +387,7 @@
|
||||
png_set_filler( png, 0xFF, PNG_FILLER_AFTER );
|
||||
|
||||
/* recheck header after setting EXPAND options */
|
||||
png_read_update_info(png, info );
|
||||
png_read_update_info( png, info );
|
||||
png_get_IHDR( png, info,
|
||||
&imgWidth, &imgHeight,
|
||||
&bitdepth, &color_type, &interlace,
|
||||
|
||||
@ -1066,7 +1066,8 @@
|
||||
*/
|
||||
if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC ||
|
||||
face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX ||
|
||||
face->colr )
|
||||
face->colr ||
|
||||
face->svg )
|
||||
flags |= FT_FACE_FLAG_COLOR; /* color glyphs */
|
||||
|
||||
if ( has_outline == TRUE )
|
||||
|
||||
@ -973,7 +973,7 @@
|
||||
/* composite glyph */
|
||||
FT_Bool have_instructions = FALSE;
|
||||
FT_UShort instruction_size = 0;
|
||||
FT_ULong composite_size;
|
||||
FT_ULong composite_size = 0;
|
||||
FT_ULong size_needed;
|
||||
FT_Byte* pointer = NULL;
|
||||
|
||||
@ -2104,7 +2104,7 @@
|
||||
error = FT_THROW( Invalid_Table );
|
||||
goto Exit;
|
||||
}
|
||||
file_offset = ROUND4(woff2.metaOffset + woff2.metaLength);
|
||||
file_offset = ROUND4( woff2.metaOffset + woff2.metaLength );
|
||||
}
|
||||
|
||||
if ( woff2.privOffset )
|
||||
@ -2114,7 +2114,7 @@
|
||||
error = FT_THROW( Invalid_Table );
|
||||
goto Exit;
|
||||
}
|
||||
file_offset = ROUND4(woff2.privOffset + woff2.privLength);
|
||||
file_offset = ROUND4( woff2.privOffset + woff2.privLength );
|
||||
}
|
||||
|
||||
if ( file_offset != ( ROUND4( woff2.length ) ) )
|
||||
|
||||
@ -465,7 +465,7 @@
|
||||
if ( subheader )
|
||||
{
|
||||
FT_Byte* p = subheader;
|
||||
FT_UInt idx = (FT_UInt)(char_code & 0xFF);
|
||||
FT_UInt idx = (FT_UInt)( char_code & 0xFF );
|
||||
FT_UInt start, count;
|
||||
FT_Int delta;
|
||||
FT_UInt offset;
|
||||
|
||||
@ -1104,8 +1104,8 @@
|
||||
|
||||
for ( ; vec < limit; vec++, u++ )
|
||||
{
|
||||
vec->x = ( FT_MulFix( u->x, x_scale ) + 32 ) >> 6;
|
||||
vec->y = ( FT_MulFix( u->y, y_scale ) + 32 ) >> 6;
|
||||
vec->x = ADD_LONG( FT_MulFix( u->x, x_scale ), 32 ) >> 6;
|
||||
vec->y = ADD_LONG( FT_MulFix( u->y, y_scale ), 32 ) >> 6;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1228,8 +1228,8 @@
|
||||
p1 = gloader->base.outline.points + k;
|
||||
p2 = gloader->base.outline.points + l;
|
||||
|
||||
x = p1->x - p2->x;
|
||||
y = p1->y - p2->y;
|
||||
x = SUB_LONG( p1->x, p2->x );
|
||||
y = SUB_LONG( p1->y, p2->y );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2255,7 +2255,7 @@
|
||||
if ( loader->widthp )
|
||||
glyph->metrics.horiAdvance = loader->widthp[glyph_index] * 64;
|
||||
else
|
||||
glyph->metrics.horiAdvance = SUB_LONG(loader->pp2.x, loader->pp1.x);
|
||||
glyph->metrics.horiAdvance = SUB_LONG( loader->pp2.x, loader->pp1.x );
|
||||
|
||||
/* set glyph dimensions */
|
||||
glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin );
|
||||
|
||||
@ -516,14 +516,6 @@
|
||||
exec->GS.round_state = 1;
|
||||
exec->GS.loop = 1;
|
||||
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
|
||||
exec->iup_called = FALSE;
|
||||
#endif
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||||
exec->iupx_called = FALSE;
|
||||
exec->iupy_called = FALSE;
|
||||
#endif
|
||||
|
||||
/* some glyphs leave something on the stack. so we clean it */
|
||||
/* before a new execution. */
|
||||
exec->top = 0;
|
||||
@ -7847,6 +7839,15 @@
|
||||
Compute_Funcs( exc );
|
||||
Compute_Round( exc, (FT_Byte)exc->GS.round_state );
|
||||
|
||||
/* These flags cancel execution of some opcodes after IUP is called */
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
|
||||
exc->iup_called = FALSE;
|
||||
#endif
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||||
exc->iupx_called = FALSE;
|
||||
exc->iupy_called = FALSE;
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
exc->opcode = exc->code[exc->IP];
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
kp->index1 = FT_Get_Char_Index( t1_face, p[0] );
|
||||
kp->index2 = FT_Get_Char_Index( t1_face, p[1] );
|
||||
|
||||
kp->x = (FT_Int)FT_PEEK_SHORT_LE(p + 2);
|
||||
kp->x = (FT_Int)FT_PEEK_SHORT_LE( p + 2 );
|
||||
kp->y = 0;
|
||||
|
||||
kp++;
|
||||
|
||||
@ -2057,9 +2057,9 @@
|
||||
name_table->elements[n][len] = '\0';
|
||||
|
||||
/* record index of /.notdef */
|
||||
if ( *cur == '.' &&
|
||||
if ( *cur == '.' &&
|
||||
ft_strcmp( ".notdef",
|
||||
(const char*)(name_table->elements[n]) ) == 0 )
|
||||
(const char*)( name_table->elements[n] ) ) == 0 )
|
||||
{
|
||||
notdef_index = n;
|
||||
notdef_found = 1;
|
||||
@ -2331,8 +2331,8 @@
|
||||
/* in valid Type 1 fonts we don't see `RD' or `-|' directly */
|
||||
/* since those tokens are handled by parse_subrs and */
|
||||
/* parse_charstrings */
|
||||
else if ( *cur == 'R' && cur + 6 < limit && *(cur + 1) == 'D' &&
|
||||
have_integer )
|
||||
else if ( *cur == 'R' && cur + 6 < limit && *( cur + 1 ) == 'D' &&
|
||||
have_integer )
|
||||
{
|
||||
FT_ULong s;
|
||||
FT_Byte* b;
|
||||
@ -2344,8 +2344,8 @@
|
||||
have_integer = 0;
|
||||
}
|
||||
|
||||
else if ( *cur == '-' && cur + 6 < limit && *(cur + 1) == '|' &&
|
||||
have_integer )
|
||||
else if ( *cur == '-' && cur + 6 < limit && *( cur + 1 ) == '|' &&
|
||||
have_integer )
|
||||
{
|
||||
FT_ULong s;
|
||||
FT_Byte* b;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user