diff options
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c | 84 |
1 files changed, 3 insertions, 81 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c index ff0d9cf1361..97e8f9c1c65 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffgload.c @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (body). * - * Copyright (C) 1996-2022 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -29,14 +29,6 @@ #include "cfferrs.h" -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT -#define IS_DEFAULT_INSTANCE( _face ) \ - ( !( FT_IS_NAMED_INSTANCE( _face ) || \ - FT_IS_VARIATION( _face ) ) ) -#else -#define IS_DEFAULT_INSTANCE( _face ) 1 -#endif - /************************************************************************** * @@ -263,8 +255,8 @@ if ( size->strike_index != 0xFFFFFFFFUL && - ( load_flags & FT_LOAD_NO_BITMAP ) == 0 && - IS_DEFAULT_INSTANCE( size->root.face ) ) + sfnt->load_eblc && + ( load_flags & FT_LOAD_NO_BITMAP ) == 0 ) { TT_SBit_MetricsRec metrics; @@ -354,76 +346,6 @@ if ( load_flags & FT_LOAD_SBITS_ONLY ) return FT_THROW( Invalid_Argument ); -#ifdef FT_CONFIG_OPTION_SVG - /* check for OT-SVG */ - if ( ( load_flags & FT_LOAD_COLOR ) && - ( (TT_Face)glyph->root.face )->svg ) - { - /* - * We load the SVG document and try to grab the advances from the - * table. For the bearings we rely on the presetting hook to do that. - */ - - FT_Short dummy; - FT_UShort advanceX; - FT_UShort advanceY; - SFNT_Service sfnt; - - - if ( size->root.metrics.x_ppem < 1 || - size->root.metrics.y_ppem < 1 ) - { - error = FT_THROW( Invalid_Size_Handle ); - return error; - } - - FT_TRACE3(( "Trying to load SVG glyph\n" )); - - sfnt = (SFNT_Service)((TT_Face)glyph->root.face)->sfnt; - error = sfnt->load_svg_doc( (FT_GlyphSlot)glyph, glyph_index ); - if ( !error ) - { - FT_TRACE3(( "Successfully loaded SVG glyph\n" )); - - glyph->root.format = FT_GLYPH_FORMAT_SVG; - - /* - * If horizontal or vertical advances are not present in the table, - * this is a problem with the font since the standard requires them. - * However, we are graceful and calculate the values by ourselves - * for the vertical case. - */ - sfnt->get_metrics( face, - FALSE, - glyph_index, - &dummy, - &advanceX ); - sfnt->get_metrics( face, - TRUE, - glyph_index, - &dummy, - &advanceY ); - - advanceX = - (FT_UShort)FT_MulDiv( advanceX, - glyph->root.face->size->metrics.x_ppem, - glyph->root.face->units_per_EM ); - advanceY = - (FT_UShort)FT_MulDiv( advanceY, - glyph->root.face->size->metrics.y_ppem, - glyph->root.face->units_per_EM ); - - glyph->root.metrics.horiAdvance = advanceX << 6; - glyph->root.metrics.vertAdvance = advanceY << 6; - - return error; - } - - FT_TRACE3(( "Failed to load SVG glyph\n" )); - } - -#endif /* FT_CONFIG_OPTION_SVG */ - /* if we have a CID subfont, use its matrix (which has already */ /* been multiplied with the root matrix) */ |