summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoazin Khatti <moazinkhatri@gmail.com>2019-08-07 14:21:09 +0500
committerMoazin Khatti <moazinkhatri@gmail.com>2019-08-26 01:17:14 +0500
commita2273959124b91c1159c39bbfe421ad2a452c531 (patch)
tree343ca903c91e99070ffa632b3f22f619edcb5673
parentdbcc809e7c6f6e943b8842af2b8bd76da2643d97 (diff)
downloadfreetype2-a2273959124b91c1159c39bbfe421ad2a452c531.tar.gz
Remove the dependence on outlines. No longer needed.
-rw-r--r--include/freetype/ftglyph.h6
-rw-r--r--src/base/ftglyph.c16
-rw-r--r--src/base/ftobjs.c3
3 files changed, 5 insertions, 20 deletions
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index 8b1e3f6b6..b29751e04 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -241,11 +241,11 @@ FT_BEGIN_HEADER
*
* @description:
* A structure used for SVG glyph images. This really is a 'sub-class'
- * of @FT_OutlineGlyphRec.
+ * of @FT_GlyphRec.
*
* @fields:
* root ::
- * The root @FT_OutlineGlyphRec fields.
+ * The root @FT_GlyphRec fields.
*
* svg_document ::
* A pointer to the SVG document.
@@ -281,7 +281,7 @@ FT_BEGIN_HEADER
*/
typedef struct FT_SvgGlyphRec_
{
- FT_OutlineGlyphRec root;
+ FT_GlyphRec root;
FT_Byte* svg_document;
FT_ULong svg_document_length;
FT_UInt glyph_index;
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 57603f1e7..93795c89f 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -317,11 +317,6 @@
goto Exit;
}
- /* init the parent first */
- slot->format = FT_GLYPH_FORMAT_OUTLINE;
- ft_outline_glyph_class.glyph_init( svg_glyph, slot );
- slot->format = FT_GLYPH_FORMAT_SVG;
-
/* allocate a new document */
doc_length = document->svg_document_length;
glyph->svg_document = memory->alloc( memory, doc_length );
@@ -331,7 +326,6 @@
glyph->units_per_EM = document->units_per_EM;
glyph->start_glyph_id = document->start_glyph_id;
glyph->end_glyph_id = document->end_glyph_id;
-
/* copy the document into glyph */
FT_MEM_COPY( glyph->svg_document, document->svg_document, doc_length );
@@ -346,9 +340,6 @@
FT_SvgGlyph glyph = (FT_SvgGlyph)svg_glyph;
FT_Memory memory = svg_glyph->library->memory;
- /* free the parent first */
- ft_outline_glyph_class.glyph_done( svg_glyph );
-
/* just free the memory */
memory->free( memory, glyph->svg_document );
}
@@ -374,8 +365,6 @@
return error;
}
- /* copy the parent first */
- ft_outline_glyph_class.glyph_copy( svg_source, svg_target );
target->glyph_index = source->glyph_index;
target->svg_document_length = source->svg_document_length;
@@ -410,10 +399,6 @@
if ( FT_NEW( document ) )
return error;
- /* call the parent and prepare it */
- ft_outline_glyph_class.glyph_prepare( svg_glyph, slot );
- slot->format = FT_GLYPH_FORMAT_SVG;
-
document->svg_document = glyph->svg_document;
document->svg_document_length = glyph->svg_document_length;
document->metrics = glyph->metrics;
@@ -508,7 +493,6 @@
if ( error )
goto Exit;
- copy->advance = source->advance;
copy->format = source->format;
if ( clazz->glyph_copy )
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index f4fb1db6c..a77c9854d 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -382,10 +382,11 @@
module = FT_Get_Module(slot->library, "ot-svg" );
SVG_Service svg_service = module->clazz->module_interface;
- svg_service->preset_slot( module, slot, FALSE );
+ return svg_service->preset_slot( module, slot, FALSE );
}
else
return 1;
+ return 1;
}
if ( origin )