From 366e2d893e14826c3669e14911efa745d690d074 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 1 Aug 2022 12:03:20 +0300 Subject: [TextServer] Add a build warning when building with external FreeType without Brotli support. --- modules/text_server_adv/SCsub | 1 + modules/text_server_adv/text_server_adv.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/text_server_adv') diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub index d212fe62b4..93fd8fe45f 100644 --- a/modules/text_server_adv/SCsub +++ b/modules/text_server_adv/SCsub @@ -507,6 +507,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: diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index 8cd0e753ba..8852c40406 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -112,7 +112,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 #include #endif -- cgit v1.2.3