Skip to content

Commit

Permalink
Merge pull request #74556 from AThousandShips/text_adv_svg_freetype
Browse files Browse the repository at this point in the history
[TextServer] Make sure Freetype is enabled for ot-svg
  • Loading branch information
YuriSizov authored Mar 15, 2023
2 parents 1514b9b + 3a5d7a4 commit b5845f8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions modules/text_server_adv/text_server_adv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ using namespace godot;
#endif

#ifdef MODULE_SVG_ENABLED
#ifdef MODULE_FREETYPE_ENABLED
#include "thorvg_svg_in_ot.h"
#endif
#endif

/*************************************************************************/
/* bmp_font_t HarfBuzz Bitmap font interface */
Expand Down
4 changes: 3 additions & 1 deletion modules/text_server_adv/thorvg_svg_in_ot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ using namespace godot;
#include "core/typedefs.h"
#include "core/variant/variant.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 "thorvg_bounds_iterator.h"
#include "thorvg_svg_in_ot.h"
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion modules/text_server_adv/thorvg_svg_in_ot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions modules/text_server_fb/text_server_fb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ using namespace godot;
#endif

#ifdef MODULE_SVG_ENABLED
#ifdef MODULE_FREETYPE_ENABLED
#include "thorvg_svg_in_ot.h"
#endif
#endif

/*************************************************************************/

Expand Down
2 changes: 2 additions & 0 deletions modules/text_server_fb/thorvg_svg_in_ot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion modules/text_server_fb/thorvg_svg_in_ot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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

0 comments on commit b5845f8

Please sign in to comment.