Re: [hackers] [st][PATCH] st-disable-bold-italic-fonts-0.8.2

From: Eric Pruitt <eric.pruitt_AT_gmail.com>
Date: Mon, 1 Apr 2019 22:22:00 -0700

On Mon, Apr 01, 2019 at 10:19:30PM -0700, Eric Pruitt wrote:
> On Sat, Mar 30, 2019 at 02:31:56PM +0100, Ryan Kes wrote:
> > +int disableroman = 0;
> > [...]
> > + if (!disableitalic)
> > + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
> > + if (!disableroman)
> > + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
>
> I don't think you need separate conditions/booleans for FC_SLANT_ROMAN
> because roman is the opposite of italic, so the code should read
> something like this:
>
> FcPatternAddInteger(pattern, FC_SLANT, disableitalic ? FC_SLANT_ROMAN : FC_SLANT_ITALIC);
>
> Or maybe I don't understand how Fontconfig works.

I realized that's also wrong as I sent the message. Just get rid of the
"disableroman" variable and the associated "if" statement.

Eric
Received on Tue Apr 02 2019 - 07:22:00 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 02 2019 - 13:24:22 CEST