[Fontconfig] Forcing Artificial Italics on Fonts That *DO* Have One Available?

Behdad Esfahbod behdad at behdad.org
Mon Aug 4 21:22:01 PDT 2008


On Mon, 2008-08-04 at 20:06 -0500, Erik wrote:
> 
> But, the end effect is to do double italics, i.e. it slants it twice.  

This is because the italic face has already been selected.

> Does anybody have an idea on how to force it to first select the regular 
> font, then apply artificial slanting to it?

I have a couple of ideas:

  - Ban all Italic fonts so fontconfig does not see them at all. (may
use target=scan for this, not sure).

  - This one should be easier:

    * In target=pattern, copy the slant value to a temp variable (say,
saved_slant),
    * In target=pattern reset slant to roman,
    * In target=font, use saved_slant to decide whether to do artificial
slanting.

HTH,

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the Fontconfig mailing list