diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 5f6c7e8a3ef..e038cb8d4ae 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -2251,6 +2251,8 @@ Dictionary TextServerAdvanced::_font_get_ot_name_strings(const RID &p_font_rid) FontAdvanced *fd = _get_font_data(p_font_rid); ERR_FAIL_NULL_V(fd, Dictionary()); + Dictionary out; +#ifdef MODULE_FREETYPE_ENABLED MutexLock lock(fd->mutex); Vector2i size = _get_size(fd, 16); FontForSizeAdvanced *ffsd = nullptr; @@ -2353,11 +2355,10 @@ Dictionary TextServerAdvanced::_font_get_ot_name_strings(const RID &p_font_rid) } } - Dictionary out; for (const KeyValue &E : names_for_lang) { out[E.key] = E.value; } - +#endif return out; } @@ -5721,6 +5722,7 @@ RID TextServerAdvanced::_find_sys_font_for_text(const RID &p_fdef, const String } bool fb_use_msdf = key.msdf; +#ifdef MODULE_FREETYPE_ENABLED if (fb_use_msdf) { FontAdvanced *fd = _get_font_data(sysf.rid); if (fd) { @@ -5734,6 +5736,7 @@ RID TextServerAdvanced::_find_sys_font_for_text(const RID &p_fdef, const String } } } +#endif _font_set_antialiasing(sysf.rid, key.antialiasing); _font_set_disable_embedded_bitmaps(sysf.rid, key.disable_embedded_bitmaps); diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 9be4c8d5dad..9c3d968e603 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -4472,6 +4472,7 @@ RID TextServerFallback::_find_sys_font_for_text(const RID &p_fdef, const String } bool fb_use_msdf = key.msdf; +#ifdef MODULE_FREETYPE_ENABLED if (fb_use_msdf) { FontFallback *fd = _get_font_data(sysf.rid); if (fd) { @@ -4485,6 +4486,7 @@ RID TextServerFallback::_find_sys_font_for_text(const RID &p_fdef, const String } } } +#endif _font_set_antialiasing(sysf.rid, key.antialiasing); _font_set_disable_embedded_bitmaps(sysf.rid, key.disable_embedded_bitmaps);