mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #111001 from bruvzg/ts_no_ft
Fix text servers build with disabled FreeType.
This commit is contained in:
commit
e1a6334b56
2 changed files with 7 additions and 2 deletions
|
@ -2257,6 +2257,8 @@ Dictionary TextServerAdvanced::_font_get_ot_name_strings(const RID &p_font_rid)
|
||||||
FontAdvanced *fd = _get_font_data(p_font_rid);
|
FontAdvanced *fd = _get_font_data(p_font_rid);
|
||||||
ERR_FAIL_NULL_V(fd, Dictionary());
|
ERR_FAIL_NULL_V(fd, Dictionary());
|
||||||
|
|
||||||
|
Dictionary out;
|
||||||
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
MutexLock lock(fd->mutex);
|
MutexLock lock(fd->mutex);
|
||||||
Vector2i size = _get_size(fd, 16);
|
Vector2i size = _get_size(fd, 16);
|
||||||
FontForSizeAdvanced *ffsd = nullptr;
|
FontForSizeAdvanced *ffsd = nullptr;
|
||||||
|
@ -2359,11 +2361,10 @@ Dictionary TextServerAdvanced::_font_get_ot_name_strings(const RID &p_font_rid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary out;
|
|
||||||
for (const KeyValue<String, Dictionary> &E : names_for_lang) {
|
for (const KeyValue<String, Dictionary> &E : names_for_lang) {
|
||||||
out[E.key] = E.value;
|
out[E.key] = E.value;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5727,6 +5728,7 @@ RID TextServerAdvanced::_find_sys_font_for_text(const RID &p_fdef, const String
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fb_use_msdf = key.msdf;
|
bool fb_use_msdf = key.msdf;
|
||||||
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
if (fb_use_msdf) {
|
if (fb_use_msdf) {
|
||||||
FontAdvanced *fd = _get_font_data(sysf.rid);
|
FontAdvanced *fd = _get_font_data(sysf.rid);
|
||||||
if (fd) {
|
if (fd) {
|
||||||
|
@ -5740,6 +5742,7 @@ RID TextServerAdvanced::_find_sys_font_for_text(const RID &p_fdef, const String
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_font_set_antialiasing(sysf.rid, key.antialiasing);
|
_font_set_antialiasing(sysf.rid, key.antialiasing);
|
||||||
_font_set_disable_embedded_bitmaps(sysf.rid, key.disable_embedded_bitmaps);
|
_font_set_disable_embedded_bitmaps(sysf.rid, key.disable_embedded_bitmaps);
|
||||||
|
|
|
@ -4473,6 +4473,7 @@ RID TextServerFallback::_find_sys_font_for_text(const RID &p_fdef, const String
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fb_use_msdf = key.msdf;
|
bool fb_use_msdf = key.msdf;
|
||||||
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
if (fb_use_msdf) {
|
if (fb_use_msdf) {
|
||||||
FontFallback *fd = _get_font_data(sysf.rid);
|
FontFallback *fd = _get_font_data(sysf.rid);
|
||||||
if (fd) {
|
if (fd) {
|
||||||
|
@ -4486,6 +4487,7 @@ RID TextServerFallback::_find_sys_font_for_text(const RID &p_fdef, const String
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_font_set_antialiasing(sysf.rid, key.antialiasing);
|
_font_set_antialiasing(sysf.rid, key.antialiasing);
|
||||||
_font_set_disable_embedded_bitmaps(sysf.rid, key.disable_embedded_bitmaps);
|
_font_set_disable_embedded_bitmaps(sysf.rid, key.disable_embedded_bitmaps);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue