[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] wl/freetype-ot-svg-from-scratch-new f27826c7a 1/6: Add the f
From: |
Werner Lemberg |
Subject: |
[freetype2] wl/freetype-ot-svg-from-scratch-new f27826c7a 1/6: Add the flag FT_CONFIG_OPTION_SVG. |
Date: |
Mon, 3 Jan 2022 13:29:44 -0500 (EST) |
branch: wl/freetype-ot-svg-from-scratch-new
commit f27826c7a07ce33411abc9969eec3f17b63e4d64
Author: Moazin Khatti <moazinkhatri@gmail.com>
Commit: Werner Lemberg <wl@gnu.org>
Add the flag FT_CONFIG_OPTION_SVG.
This flag is going to be used to conditionally compile support for
OT-SVG glyphs. FreeType will do the parsing and rely on external
hooks for rendering of OT-SVG glyphs. A system installation of
zlib is required for GZIP compressed glyphs.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_SVG): New flag.
---
devel/ftoption.h | 28 ++++++++++++++++++++++++++++
include/freetype/config/ftoption.h | 27 +++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/devel/ftoption.h b/devel/ftoption.h
index a99c4c97d..cd3d41d38 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -525,6 +525,20 @@ FT_BEGIN_HEADER
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+ /**************************************************************************
+ *
+ * OpenType SVG Glyph Support
+ *
+ * Setting this macro enables support for OpenType SVG glyphs. By
+ * default, FreeType can only fetch SVG documents. However, it can also
+ * render them if external rendering hook functions are plugged in at
+ * runtime.
+ *
+ * More details on the hooks can be found in file `otsvg.h`.
+ */
+#define FT_CONFIG_OPTION_SVG
+
+
/**************************************************************************
*
* Error Strings
@@ -1004,6 +1018,20 @@ FT_BEGIN_HEADER
#error "Invalid CFF darkening parameters!"
#endif
+
+ /*
+ * OpenType SVG support needs system Zlib to do the decompression
+ * as the internal Zlib is not capable of doing that because of being
+ * outdated.
+ */
+#if defined( FT2_BUILD_LIBRARY ) && \
+ defined( FT_CONFIG_OPTION_SVG ) && \
+ !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB )
+#pragma message "External installation of ZLIB is needed"
+#pragma message "to support GZIP compressed SVG documents"
+#endif
+
+
FT_END_HEADER
diff --git a/include/freetype/config/ftoption.h
b/include/freetype/config/ftoption.h
index 487b33364..dcf3f22f1 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -527,6 +527,20 @@ FT_BEGIN_HEADER
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+ /**************************************************************************
+ *
+ * OpenType SVG Glyph Support
+ *
+ * Setting this macro enables support for OpenType SVG glyphs. By
+ * default, FreeType can only fetch SVG documents. However, it can also
+ * render them if external rendering hook functions are plugged in at
+ * runtime.
+ *
+ * More details on the hooks can be found in file `otsvg.h`.
+ */
+#define FT_CONFIG_OPTION_SVG
+
+
/**************************************************************************
*
* Error Strings
@@ -1006,6 +1020,19 @@ FT_BEGIN_HEADER
#error "Invalid CFF darkening parameters!"
#endif
+ /*
+ * OpenType SVG support needs system Zlib to do the decompression
+ * as the internal Zlib is not capable of doing that because of being
+ * outdated.
+ */
+#if defined( FT2_BUILD_LIBRARY ) && \
+ defined( FT_CONFIG_OPTION_SVG ) && \
+ !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB )
+#pragma message "External installation of ZLIB is needed"
+#pragma message "to support GZIP compressed SVG documents"
+#endif
+
+
FT_END_HEADER
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] wl/freetype-ot-svg-from-scratch-new f27826c7a 1/6: Add the flag FT_CONFIG_OPTION_SVG.,
Werner Lemberg <=