forked from minhngoc25a/freetype2
Fixes code warnings.
This commit is contained in:
parent
74f80fba49
commit
fdb7d53ebf
|
@ -379,9 +379,10 @@
|
|||
{
|
||||
if ( slot->format == FT_GLYPH_FORMAT_SVG )
|
||||
{
|
||||
module = FT_Get_Module(slot->library, "ot-svg" );
|
||||
SVG_Service svg_service = module->clazz->module_interface;
|
||||
SVG_Service svg_service;
|
||||
|
||||
module = FT_Get_Module(slot->library, "ot-svg" );
|
||||
svg_service = (SVG_Service)module->clazz->module_interface;
|
||||
return svg_service->preset_slot( module, slot, FALSE );
|
||||
}
|
||||
else
|
||||
|
|
|
@ -352,15 +352,19 @@
|
|||
if ( ( load_flags & FT_LOAD_COLOR ) &&
|
||||
( ((TT_Face)glyph->root.face)->svg ) )
|
||||
{
|
||||
SFNT_Service sfnt;
|
||||
FT_Short leftBearing;
|
||||
FT_Short topBearing;
|
||||
FT_UShort advanceX;
|
||||
FT_UShort advanceY;
|
||||
|
||||
FT_TRACE3(( "Attemping to load SVG glyph\n" ));
|
||||
SFNT_Service sfnt = (SFNT_Service)((TT_Face)glyph->root.face)->sfnt;
|
||||
sfnt = (SFNT_Service)((TT_Face)glyph->root.face)->sfnt;
|
||||
error = sfnt->load_svg_doc( (FT_GlyphSlot)glyph, glyph_index );
|
||||
if( error == FT_Err_Ok )
|
||||
{
|
||||
FT_TRACE3(( "Successfully loaded SVG glyph\n" ));
|
||||
glyph->root.format = FT_GLYPH_FORMAT_SVG;
|
||||
FT_Short leftBearing, topBearing;
|
||||
FT_UShort advanceX, advanceY;
|
||||
sfnt->get_metrics( face,
|
||||
FALSE,
|
||||
glyph_index,
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
svg_renderer->loaded = TRUE;
|
||||
}
|
||||
|
||||
ft_svg_preset_slot( renderer, slot, TRUE);
|
||||
ft_svg_preset_slot( (FT_Module)renderer, slot, TRUE);
|
||||
size_image_buffer = slot->bitmap.pitch * slot->bitmap.rows;
|
||||
FT_MEM_ALLOC( slot->bitmap.buffer, size_image_buffer);
|
||||
if ( error )
|
||||
|
@ -191,10 +191,13 @@
|
|||
|
||||
#ifdef FT_CONFIG_OPTION_SVG
|
||||
#define PUT_SVG_MODULE( a ) a
|
||||
#define SVG_GLYPH_FORMAT FT_GLYPH_FORMAT_SVG
|
||||
#else
|
||||
#define PUT_SVG_MODULE( a ) NULL
|
||||
#define SVG_GLYPH_FORMAT FT_GLYPH_FORMAT_NONE
|
||||
#endif
|
||||
|
||||
|
||||
FT_DEFINE_RENDERER(
|
||||
ft_svg_renderer_class,
|
||||
|
||||
|
@ -208,11 +211,7 @@
|
|||
(FT_Module_Constructor)PUT_SVG_MODULE( ft_svg_init ), /* module_init */
|
||||
(FT_Module_Destructor)PUT_SVG_MODULE( ft_svg_done ), /* module_done */
|
||||
PUT_SVG_MODULE( ft_svg_get_interface ), /* get_interface */
|
||||
#ifdef FT_CONFIG_OPTION_SVG
|
||||
FT_GLYPH_FORMAT_SVG,
|
||||
#else
|
||||
FT_GLYPH_FORMAT_NONE,
|
||||
#endif
|
||||
SVG_GLYPH_FORMAT,
|
||||
(FT_Renderer_RenderFunc)PUT_SVG_MODULE( ft_svg_render ),
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
|
@ -2911,22 +2911,25 @@
|
|||
/* check for OT-SVG */
|
||||
if ( ( load_flags & FT_LOAD_COLOR ) && ( ((TT_Face)glyph->face)->svg ) )
|
||||
{
|
||||
FT_TRACE3(( "Attemping to load SVG glyph\n" ));
|
||||
SFNT_Service sfnt;
|
||||
FT_Short leftBearing;
|
||||
FT_Short topBearing;
|
||||
FT_UShort advanceX;
|
||||
FT_UShort advanceY;
|
||||
|
||||
FT_TRACE3(( "Attemping to load SVG glyph\n" ));
|
||||
sfnt = (SFNT_Service)((TT_Face)glyph->face)->sfnt;
|
||||
error = sfnt->load_svg_doc( glyph, glyph_index );
|
||||
if( error == FT_Err_Ok )
|
||||
{
|
||||
FT_TRACE3(( "Successfully loaded SVG glyph\n" ));
|
||||
glyph->format = FT_GLYPH_FORMAT_SVG;
|
||||
FT_Short leftBearing, topBearing;
|
||||
FT_UShort advanceX, advanceY;
|
||||
sfnt->get_metrics( glyph->face,
|
||||
sfnt->get_metrics( (TT_Face)glyph->face,
|
||||
FALSE,
|
||||
glyph_index,
|
||||
&leftBearing,
|
||||
&advanceX );
|
||||
sfnt->get_metrics( glyph->face,
|
||||
sfnt->get_metrics( (TT_Face)glyph->face,
|
||||
TRUE,
|
||||
glyph_index,
|
||||
&topBearing,
|
||||
|
|
Loading…
Reference in New Issue