Commit Graph

2 Commits

Author SHA1 Message Date
Moazin Khatti ce64d9cbf1 Adds the functionality to load SVG documents.
SVG document corresponding to a glyphID is fetched and stored
in an `FT_SVG_Document' structure which is referenced in the
glyphslot.

* include/freetype/config/ftheader.h: Adds `FT_OTSVG_H'.

* include/freetype/ftimage.h: Adds `FT_GLYPH_FORMAT_SVG'.

* include/freetype/internal/ftobjs.h: Adds `FT_GLYPH_OWN_GZIP_SVG'.

* include/freetype/internal/sfnt.h: Adds `load_svg_doc' and its
function type `TT_Load_Svg_Doc_Func'.

* include/freetype/otsvg.h: Adds `FT_SVG_Document' and its struct.

* src/base/ftobjs.c: Adds code to allocate and free memory for
`FT_SVG_Document' in `slot->other'.

* src/cff/cffgload.c: Adds code to load SVG glyph if it's present.

* src/truetype/ttgload.c: Ditto.

* src/sfnt/sfdriver.c: Adds `tt_face_load_svg_doc'.

* src/sfnt/ttsvg.h: Ditto.

* src/sfnt/ttsvg.c: Adds implementation of `tt_face_load_svg_doc'
and its helper functions.
2019-08-10 16:11:07 +05:00
Moazin Khatti 92eeba75c4 [sfnt] Adds the functionality to load `SVG' table.
Adds code to load the SVG table data into an `svg'
structure and set the flag `FT_FACE_FLAG_SVG'.

* include/freetype/freetype.h: Adds `FT_FACE_FLAG_SVG'.

* include/freetype/internal/sfnt.h: Adds the fields
`load_svg' and `free_svg' to `SFNT_Interface'.

* include/freetype/internal/tttypes.h: Adds a void
pointer field `svg' to hold info from `SVG' table.

* include/freetype/internal/tttags.h: Adds the tag
`TTAG_SVG'.

* src/sfnt/ttsvg.c: Writes the functions
`tt_face_load_svg' and `tt_face_free_svg'

* src/sfnt/ttsvg.h: Writes header declarations for
`tt_face_load_svg' and `tt_face_free_svg'.

* src/sfnt/sfdriver.c: Adds the functions
`tt_face_load_svg' and `tt_face_free_svg' to
`sfnt_interface'.

* src/sfnt/sfnt.c: Includes `ttsvg.c'.

* src/sfnt/sfobjs.c: (sfnt_load_face) Adds code to
load `svg' table struct. (sfnt_done_face) Adds code
to free `svg' table struct.
2019-08-05 22:48:16 +05:00