[LyX/master] Fix Qt dep warn and remove XLFD font workaround

Enrico Forestieri forenr at lyx.org
Fri Mar 20 11:15:32 UTC 2020


On Thu, Mar 19, 2020 at 05:12:19PM +0100, Scott Kostyshak wrote:
> commit d4ff3a295959d27e21fb914d78505cebd96732ad
> Author: Scott Kostyshak <skostysh at lyx.org>
> Date:   Thu Mar 19 12:20:16 2020 -0400
> 
>     Fix Qt dep warn and remove XLFD font workaround
[...]
> @@ -215,11 +204,8 @@ QFont symbolFont(QString const & family, bool * ok)
>  		return font;
>  	}
>  
> -	// A simple setFamily() fails on Qt 2
> -
> -	QString const raw = rawName(family);
> -	LYXERR(Debug::FONT, "Trying " << raw << " ... ");
> -	font.setRawName(raw);
> +	LYXERR(Debug::FONT, "Trying " << family << " ... ");
> +	font.setFamily(family);
>  
>  	if (isChosenFont(font, family, QString())) {
>  		LYXERR(Debug::FONT, "raw version!");

I think you should have simply removed this case. It will never trigger
because it is already taken into account under the "normal" case.
So, the correct change would have been:

> @@ -215,17 +204,6 @@ QFont symbolFont(QString const & family, bool * ok)
>  		return font;
>  	}
>  
> -	// A simple setFamily() fails on Qt 2
> -
> -	QString const raw = rawName(family);
> -	LYXERR(Debug::FONT, "Trying " << raw << " ... ");
> -	font.setRawName(raw);
> -
> -	if (isChosenFont(font, family, QString())) {
> -		LYXERR(Debug::FONT, "raw version!");
> -		*ok = true;
> -		return font;
> -	}
>
>	LYXERR(Debug::FONT, " FAILED :-(");
>	*ok = false;

-- 
Enrico


More information about the lyx-devel mailing list