Public interface should remain same whether

`FT_CONFIG_OPTION_SVG' is set or not.
This commit is contained in:
Moazin Khatti 2019-07-17 15:57:02 +05:00
parent 3b62e9dc9d
commit b6f2303338
6 changed files with 15 additions and 10 deletions

View File

@ -1227,9 +1227,7 @@ FT_BEGIN_HEADER
#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
#define FT_FACE_FLAG_COLOR ( 1L << 14 )
#define FT_FACE_FLAG_VARIATION ( 1L << 15 )
#ifdef FT_CONFIG_OPTION_SVG
#define FT_FACE_FLAG_SVG ( 1L << 16 )
#endif
/**************************************************************************

View File

@ -223,7 +223,6 @@ FT_BEGIN_HEADER
} FT_OutlineGlyphRec;
#ifdef FT_CONFIG_OPTION_SVG
/**************************************************************************
*
* @type:
@ -293,7 +292,6 @@ FT_BEGIN_HEADER
/* TODO: (OT-SVG) Maybe put a transformation matrix here */
} FT_SvgGlyphRec;
#endif
/**************************************************************************
*

View File

@ -419,9 +419,7 @@ FT_BEGIN_HEADER
*/
#define FT_GLYPH_OWN_BITMAP 0x1U
#ifdef FT_CONFIG_OPTION_SVG
#define FT_GLYPH_OWN_GZIP_SVG 0x2U
#endif
typedef struct FT_Slot_InternalRec_
{

View File

@ -1645,10 +1645,8 @@ FT_BEGIN_HEADER
void* cpal;
void* colr;
#ifdef FT_CONFIG_OPTION_SVG
/* OpenType SVG Glyph Support */
void* svg;
#endif
} TT_FaceRec;

View File

@ -28,7 +28,6 @@
#error "so that freetype.h of FreeType 2 is found first."
#endif
#ifdef FT_CONFIG_OPTION_SVG
FT_BEGIN_HEADER
/**************************************************************************
@ -256,5 +255,4 @@ FT_BEGIN_HEADER
typedef struct FT_SVG_DocumentRec_* FT_SVG_Document;
FT_END_HEADER
#endif /* FT_CONFIG_OPTION_SVG */
#endif

View File

@ -5629,6 +5629,21 @@
get_buffer_size );
return FT_Err_Ok;
}
#else
FT_EXPORT_DEF( FT_Error )
FT_Set_Svg_Hooks( FT_Library library,
SVG_Lib_Init_Func init_svg,
SVG_Lib_Free_Func free_svg,
SVG_Lib_Render_Func render_svg,
SVG_Lib_Get_Buffer_Size_Func get_buffer_size )
{
FT_UNUSED( library );
FT_UNUSED( init_svg );
FT_UNUSED( free_svg );
FT_UNUSED( render_svg );
FT_UNUSED( get_buffer_size );
return FT_THROW( Unimplemented_Feature );
}
#endif
/* END */