summaryrefslogtreecommitdiffstats
path: root/modules/text_server_fb
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-03-15 15:04:01 +0100
committerGitHub <noreply@github.com>2023-03-15 15:04:01 +0100
commitb5845f87fc875a9a8c6ec0a603495cfb7367df90 (patch)
tree0ef7db5faee132b4e9929bd7087b27733c2a32b0 /modules/text_server_fb
parent1514b9be68966e23b2b3c72e92888d1aabf5cd3c (diff)
parent3a5d7a4b5495f3f2d67ef9831b353168db6808e3 (diff)
downloadredot-engine-b5845f87fc875a9a8c6ec0a603495cfb7367df90.tar.gz
Merge pull request #74556 from AThousandShips/text_adv_svg_freetype
[TextServer] Make sure Freetype is enabled for ot-svg
Diffstat (limited to 'modules/text_server_fb')
-rw-r--r--modules/text_server_fb/text_server_fb.cpp2
-rw-r--r--modules/text_server_fb/thorvg_svg_in_ot.cpp2
-rw-r--r--modules/text_server_fb/thorvg_svg_in_ot.h4
3 files changed, 7 insertions, 1 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index 8687726287..66f4ece1eb 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -66,8 +66,10 @@ using namespace godot;
#endif
#ifdef MODULE_SVG_ENABLED
+#ifdef MODULE_FREETYPE_ENABLED
#include "thorvg_svg_in_ot.h"
#endif
+#endif
/*************************************************************************/
diff --git a/modules/text_server_fb/thorvg_svg_in_ot.cpp b/modules/text_server_fb/thorvg_svg_in_ot.cpp
index 1406e3aaa0..a646d904be 100644
--- a/modules/text_server_fb/thorvg_svg_in_ot.cpp
+++ b/modules/text_server_fb/thorvg_svg_in_ot.cpp
@@ -53,6 +53,7 @@ using namespace godot;
#endif
#ifdef MODULE_SVG_ENABLED
+#ifdef MODULE_FREETYPE_ENABLED
#include "thorvg_bounds_iterator.h"
#include "thorvg_svg_in_ot.h"
@@ -284,4 +285,5 @@ SVG_RendererHooks *get_tvg_svg_in_ot_hooks() {
return &tvg_svg_in_ot_hooks;
}
+#endif // MODULE_FREETYPE_ENABLED
#endif // MODULE_SVG_ENABLED
diff --git a/modules/text_server_fb/thorvg_svg_in_ot.h b/modules/text_server_fb/thorvg_svg_in_ot.h
index 4035a984b6..95ba29a20d 100644
--- a/modules/text_server_fb/thorvg_svg_in_ot.h
+++ b/modules/text_server_fb/thorvg_svg_in_ot.h
@@ -47,10 +47,11 @@ using namespace godot;
#include "core/templates/hash_map.h"
#include "core/typedefs.h"
-#include "modules/modules_enabled.gen.h" // For svg.
+#include "modules/modules_enabled.gen.h" // For svg, freetype.
#endif
#ifdef MODULE_SVG_ENABLED
+#ifdef MODULE_FREETYPE_ENABLED
#include <freetype/freetype.h>
#include <freetype/otsvg.h>
@@ -81,6 +82,7 @@ FT_Error tvg_svg_in_ot_render(FT_GlyphSlot p_slot, FT_Pointer *p_state);
SVG_RendererHooks *get_tvg_svg_in_ot_hooks();
+#endif // MODULE_FREETYPE_ENABLED
#endif // MODULE_SVG_ENABLED
#endif // THORVG_SVG_IN_OT_H