Merge pull request #115949 from bruvzg/ts_clamp_size

[TextServer] Clamp internal font rendering size to 2048.
This commit is contained in:
Thaddeus Crews 2026-02-06 08:17:57 -06:00
commit 3f3dc88c7e
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
2 changed files with 4 additions and 4 deletions

View file

@ -1509,8 +1509,8 @@ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_font_data, const
} else {
FT_Size_RequestRec req;
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
req.width = sz * 64.0;
req.height = sz * 64.0;
req.width = MIN(2048.0, sz) * 64.0;
req.height = MIN(2048.0, sz) * 64.0;
req.horiResolution = 0;
req.vertResolution = 0;

View file

@ -936,8 +936,8 @@ bool TextServerFallback::_ensure_cache_for_size(FontFallback *p_font_data, const
} else {
FT_Size_RequestRec req;
req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
req.width = sz * 64.0;
req.height = sz * 64.0;
req.width = MIN(2048.0, sz) * 64.0;
req.height = MIN(2048.0, sz) * 64.0;
req.horiResolution = 0;
req.vertResolution = 0;