summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoazin Khatti <moazinkhatri@gmail.com>2019-08-24 18:39:50 +0500
committerMoazin Khatti <moazinkhatri@gmail.com>2019-08-26 01:17:15 +0500
commitf943af64905378bde29eaf7c4404f1a0fb971830 (patch)
tree54c9d65fffeb2b647f2532b9d2a25a66944afade
parenteb9a614011051580f54c9f1878e2783ac4b93607 (diff)
downloadfreetype2-GSoC-2019-moazin.tar.gz
Document `svg_hooks` property.GSoC-2019-moazin
-rw-r--r--include/freetype/ftdriver.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/freetype/ftdriver.h b/include/freetype/ftdriver.h
index 497bde9f6..5c8b8360f 100644
--- a/include/freetype/ftdriver.h
+++ b/include/freetype/ftdriver.h
@@ -621,6 +621,46 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * @property:
+ * svg_hooks
+ *
+ * @description:
+ * OT-SVG glyphs are rendererd with the use of some callback hooks to an
+ * external SVG rendering library. OT-SVG glyphs support can be enabled
+ * by compiling FreeType with `FT_CONFIG_OPTION_SVG`. The hooks can be
+ * stored in an @SVG_RendererHooks structure, which is then passed as the
+ * value of `svg_hooks` property. See the example. We also provide
+ * default hooks which can be enabled by compiling with
+ * `FT_CONFIG_OPTION_DEFAULT_SVG`. Then, nothing needs to be set from
+ * the user side, unless the user wants to use some other library.
+ *
+ * @note:
+ * This property can only be set via @FT_Property_Set.
+ *
+ * @example:
+ * ```
+ * FT_Library library;
+ * SVG_RendererHooks hooks;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * hooks.init_svg = (SVG_Lib_Init_Func)foo_port_init;
+ * hooks.free_svg = (SVG_Lib_Free_Func)foo_port_free;
+ * hooks.render_svg = (SVG_Lib_Render_Func)foo_port_render;
+ * hooks.preset_slot = (SVG_Lib_Preset_Slot_Func)foo_port_preset_slot;
+ *
+ * FT_Property_Set( library, "ot-svg", "svg_hooks", &hooks );
+ *
+ * ```
+ *
+ * @since:
+ * 2.11
+ */
+
+
+ /**************************************************************************
+ *
* @enum:
* TT_INTERPRETER_VERSION_XXX
*