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


Reply via email to