Re: Pango crossplatform layout size query
- From: Behdad Esfahbod <behdad behdad org>
- To: Richard Procter <richard n procter gmail com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Pango crossplatform layout size query
- Date: Thu, 08 Apr 2010 12:49:40 -0400
On 04/06/2010 08:09 PM, Richard Procter wrote:
>> Sure, you can try turning metrics hinting off. That should give you
>> fairly robust results.
>
> Good to know.
>
> At first, I thought this causes layout to use the real glyph metrics,
> not the nominal ones altered by glyph hinting, that being sufficient to
> decouple layout from the device. The logical width of a rendered line of
> text would be accurate to within a device pixel, at the cost of not
> attempting to absorb into the layout some of the error inflicted by the
> device's lower precision.
>
> However, the cairo documentation states "hinting font metrics means
> quantizing them so that they are integer values in device space". This
> suggests I'm wrong and that layout remains device dependent.
?? If you *disable* hinting font metrics, you are supposed to get
device-independent layout.
> I have tested this using the attached C program on OS X 10.4,
> Debian Linux (lenny), and Win32, using the same MS arial.ttf font file.
> OS X and Linux get identical logical extents, but win32 differs (see
> below for details - in fact it doesn't appear to honour the option).
IIRC neither win32 nor quartz cairo font backends respect the hinting flags
(yet). That's a bug.
> If I understand metrics hinting, this last is a bug, and I can rely
> on the others to remain equal, plus or minus a pixel? If so, can
> I expect this to hold for other scripts?
Yes. The script is not relevant.
behdad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]