mirror of
https://github.com/godotengine/godot
synced 2024-09-05 16:56:44 +00:00
TextServer: Fix build with freetype disabled
Also remove RTR calls as we don't translate internal error messages.
This commit is contained in:
parent
173c0f8737
commit
453aff4902
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "text_server_adv.h"
|
||||
|
||||
#include "core/error/error_macros.h"
|
||||
#include "core/string/print_string.h"
|
||||
#include "core/string/translation.h"
|
||||
|
||||
|
@ -1225,7 +1226,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontDataAdvanced
|
|||
int error = 0;
|
||||
if (!library) {
|
||||
error = FT_Init_FreeType(&library);
|
||||
ERR_FAIL_COND_V_MSG(error != 0, false, RTR("FreeType: Error initializing library:") + " '" + String(FT_Error_String(error)) + "'.");
|
||||
ERR_FAIL_COND_V_MSG(error != 0, false, "FreeType: Error initializing library: '" + String(FT_Error_String(error)) + "'.");
|
||||
}
|
||||
|
||||
memset(&fd->stream, 0, sizeof(FT_StreamRec));
|
||||
|
@ -1243,7 +1244,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontDataAdvanced
|
|||
if (error) {
|
||||
FT_Done_Face(fd->face);
|
||||
fd->face = nullptr;
|
||||
ERR_FAIL_V_MSG(false, RTR("FreeType: Error loading font:") + " '" + String(FT_Error_String(error)) + "'.");
|
||||
ERR_FAIL_V_MSG(false, "FreeType: Error loading font: '" + String(FT_Error_String(error)) + "'.");
|
||||
}
|
||||
|
||||
if (p_font_data->msdf) {
|
||||
|
@ -1588,7 +1589,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontDataAdvanced
|
|||
FT_Done_MM_Var(library, amaster);
|
||||
}
|
||||
#else
|
||||
ERR_FAIL_V_MSG(false, RTR("FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
|
||||
ERR_FAIL_V_MSG(false, "FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
|
||||
#endif
|
||||
} else {
|
||||
// Init bitmap font.
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "text_server_fb.h"
|
||||
|
||||
#include "core/error/error_macros.h"
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
#ifdef MODULE_MSDFGEN_ENABLED
|
||||
|
@ -686,7 +687,7 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontDataFallback
|
|||
int error = 0;
|
||||
if (!library) {
|
||||
error = FT_Init_FreeType(&library);
|
||||
ERR_FAIL_COND_V_MSG(error != 0, false, RTR("FreeType: Error initializing library:") + " '" + String(FT_Error_String(error)) + "'.");
|
||||
ERR_FAIL_COND_V_MSG(error != 0, false, "FreeType: Error initializing library: '" + String(FT_Error_String(error)) + "'.");
|
||||
}
|
||||
|
||||
memset(&fd->stream, 0, sizeof(FT_StreamRec));
|
||||
|
@ -704,7 +705,7 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontDataFallback
|
|||
if (error) {
|
||||
FT_Done_Face(fd->face);
|
||||
fd->face = nullptr;
|
||||
ERR_FAIL_V_MSG(false, RTR("FreeType: Error loading font:") + " '" + String(FT_Error_String(error)) + "'.");
|
||||
ERR_FAIL_V_MSG(false, "FreeType: Error loading font: '" + String(FT_Error_String(error)) + "'.");
|
||||
}
|
||||
|
||||
if (p_font_data->msdf) {
|
||||
|
@ -784,7 +785,7 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontDataFallback
|
|||
FT_Done_MM_Var(library, amaster);
|
||||
}
|
||||
#else
|
||||
ERR_FAIL_V_MSG(false, RTR("FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
|
||||
ERR_FAIL_V_MSG(false, "FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
|
||||
#endif
|
||||
}
|
||||
p_font_data->cache[p_size] = fd;
|
||||
|
|
Loading…
Reference in a new issue