diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-06 00:31:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 00:31:15 +0200 |
commit | ae335196b54813175276203181aecc14d4946f71 (patch) | |
tree | 2a20c390a7565886410ee5092389e32e7f79b39c /modules | |
parent | d100c2d59f77051281ec17f70a407838304aac21 (diff) | |
parent | 366e2d893e14826c3669e14911efa745d690d074 (diff) |
Merge pull request #63762 from bruvzg/ft_warn
[TextServer] Add a build warning when building with external FreeType without Brotli support.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/text_server_adv/SCsub | 1 | ||||
-rw-r--r-- | modules/text_server_adv/text_server_adv.h | 5 | ||||
-rw-r--r-- | modules/text_server_fb/SCsub | 1 | ||||
-rw-r--r-- | modules/text_server_fb/text_server_fb.h | 4 |
4 files changed, 10 insertions, 1 deletions
diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub index c514ebcd1b..81b8e1ea5d 100644 --- a/modules/text_server_adv/SCsub +++ b/modules/text_server_adv/SCsub @@ -515,6 +515,7 @@ if env["builtin_msdfgen"] and msdfgen_enabled: env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"]) if env["builtin_freetype"] and freetype_enabled: + env_text_server_adv.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"]) env_text_server_adv.Prepend(CPPPATH=["#thirdparty/freetype/include"]) if env["builtin_graphite"] and freetype_enabled and env["graphite"]: diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index b337abea7a..7ae329d616 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -113,7 +113,10 @@ using namespace godot; #include FT_ADVANCES_H #include FT_MULTIPLE_MASTERS_H #include FT_BBOX_H - +#include FT_CONFIG_OPTIONS_H +#if !defined(FT_CONFIG_OPTION_USE_BROTLI) && !defined(_MSC_VER) +#warning FreeType is configured without Brotli support, built-in fonts will not be available. +#endif #include <hb-ft.h> #include <hb-ot.h> #endif diff --git a/modules/text_server_fb/SCsub b/modules/text_server_fb/SCsub index ca9322e450..8f626f02b8 100644 --- a/modules/text_server_fb/SCsub +++ b/modules/text_server_fb/SCsub @@ -12,6 +12,7 @@ if env["builtin_msdfgen"] and msdfgen_enabled: env_text_server_fb.Prepend(CPPPATH=["#thirdparty/msdfgen"]) if env["builtin_freetype"] and freetype_enabled: + env_text_server_fb.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"]) env_text_server_fb.Prepend(CPPPATH=["#thirdparty/freetype/include"]) env_text_server_fb.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h index adb5cbb817..fef19d442b 100644 --- a/modules/text_server_fb/text_server_fb.h +++ b/modules/text_server_fb/text_server_fb.h @@ -98,6 +98,10 @@ using namespace godot; #include FT_ADVANCES_H #include FT_MULTIPLE_MASTERS_H #include FT_BBOX_H +#include FT_CONFIG_OPTIONS_H +#if !defined(FT_CONFIG_OPTION_USE_BROTLI) && !defined(_MSC_VER) +#warning FreeType is configured without Brotli support, built-in fonts will not be available. +#endif #endif /*************************************************************************/ |