Re: git: 3bcf8e6db8e9 - main - loader: loader can pick too large font (check if one side is larger)

From: Renato Botelho <garga_at_FreeBSD.org>
Date: Wed, 21 May 2025 17:13:20 UTC
On 13/05/25 04:46, Toomas Soome wrote:
> The branch main has been updated by tsoome:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=3bcf8e6db8e9b30af0a1d445e6e413a332066434
> 
> commit 3bcf8e6db8e9b30af0a1d445e6e413a332066434
> Author:     Toomas Soome <tsoome@FreeBSD.org>
> AuthorDate: 2025-05-13 07:40:39 +0000
> Commit:     Toomas Soome <tsoome@FreeBSD.org>
> CommitDate: 2025-05-13 07:44:35 +0000
> 
>      loader: loader can pick too large font (check if one side is larger)
>      
>      The 5e25f7b09977 still allows one side to be too large, fix it.
> ---
>   stand/common/gfx_fb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
> index ad38a657e233..af72ab1a4c99 100644
> --- a/stand/common/gfx_fb.c
> +++ b/stand/common/gfx_fb.c
> @@ -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;
I still got huge fonts if I remove screen.font from loader.conf.  What 
kind of data you want me to collect from my system to help you to get it 
fixed?

-- 
Renato Botelho