Re: [PATCH] suppress 'invalid font size' warning from aqua terminal

Ethan A Merritt <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.devel
Organization University of Washington
Message-ID <41756231.RNLicfoX69@stonelion>
Applied.
Thanks
	Ethan

On Wednesday, 4 August 2021 20:54:24 PDT Jun T wrote:
> On macOS, if I run
> 
> gnuplot> set term aqua
> 
> I get
> 
> warning: invalid terminal font size
> 
> It seems there is no real problem here, but it is somewhat annoying.
> 
> This can be fixed by calling set_font_size() always, i.e.,
> even if fsize is not specified in the 'set term' command.
> (set_font_size() sets term->h_char and v_char)
> 
> 
> diff --git a/term/aquaterm.trm b/term/aquaterm.trm
> index 939ac8411..f24595465 100644
> --- a/term/aquaterm.trm
> +++ b/term/aquaterm.trm
> @@ -234,7 +234,6 @@ AQUA_options()
>  	if (size > 0)
>  	    AQUA_fontSizeDef = size;
>  	AQUA_fontSizeCur = AQUA_fontSizeDef;
> -	set_font_size(AQUA_fontSizeCur);
>  
>  	continue;
>      }
> @@ -250,7 +249,6 @@ AQUA_options()
>  	if ((size = real_expression()) > 0)
>  	    AQUA_fontSizeDef = size;
>  	AQUA_fontSizeCur = AQUA_fontSizeDef;
> -	set_font_size(AQUA_fontSizeCur);
>  	continue;
>      }
>  
> @@ -308,6 +306,7 @@ AQUA_options()
>  
>      int_error(c_token, "unexpected text at end of command");
>    }
> +  set_font_size(AQUA_fontSizeCur);
>  
>    if (AQUA_title[0]=='\0') /* always set title */
>      sprintf(AQUA_title, "Figure %d", AQUA_plotRef);





_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.