freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] FT_GlyphSlot_Oblique doesn't alter metrics whereas FT_GlyphSlot


From: Werner LEMBERG
Subject: Re: [ft] FT_GlyphSlot_Oblique doesn't alter metrics whereas FT_GlyphSlot_Embolden does?
Date: Sun, 13 Jan 2019 19:44:05 +0100 (CET)

> Apologies if I am misled here, but I'm noting that
> FT_GlyphSlot_Embolden() alter the slot metrics, e.g. code includes.
>
>     slot->metrics.width        += xstr;
>     slot->metrics.height       += ystr;
> 
> Whereas FT_GlyphSlot_Oblique() doesn't. It only calls
> FT_Outline_Transform().  Shouldn't FT_GlyphSlot_Oblique alter
> metrics to expose the typically altered width?

Well, no, IMHO.  Oblique fonts have the same line metrics as unslanted
fonts.  However, you have to add an `italic correction'.  For an
example, see

  
http://help.madcapsoftware.com/flare2017r2/Content/Fonts/Shared/Italic/Setting-Italic-Correction.htm

> I am trying to understand if it is possible to obtain the expected
> size of a bitmap _before_ rendering it.

In general, this is *not* possible, especially if font hinting is
involved.


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]