loader: loader can pick too large font (check if one side is larger)

The 5e25f7b099 still allows one side to be too large, fix it.
This commit is contained in:
Toomas Soome 2025-05-13 10:40:39 +03:00
parent afb0eadf97
commit 3bcf8e6db8

View file

@ -2082,7 +2082,7 @@ gfx_get_font(teken_unit_t rows, teken_unit_t cols, teken_unit_t height,
* Skip too large fonts.
*/
font = fl->font_data;
if (height / font->vfbd_height < rows &&
if (height / font->vfbd_height < rows ||
width / font->vfbd_width < cols)
continue;