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 15:57:42 -0400
On 04/08/2010 03:45 PM, Richard Procter wrote:
>
> On 9/04/2010, at 4:49 AM, Behdad Esfahbod wrote:
>
>> On 04/06/2010 08:09 PM, Richard Procter wrote:
>>> 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.
>
> Right, that's what I thought.
>
> "quantizing ... so that they are integer values in device space" though
> suggests otherwise to me; I will go bug the cairo guys.
I don't understand. I *am* cairo guys :).
If metrics hinting is ON, then quantization happens -> device-dependent.
If metrics hinting is OFF, no quantization -> device-independent.
>>> 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.
>
> It looks like quartz has been fixed - it matches linux with metrics
> hinting off and differs with it on.
Nope. Quartz one doesn't respect the flags either. Just happens that Apple
doesn't quantize, while Microsoft does.
> I will raise a bug for the win32 backend if there isn't one already.
It's fairly known issue. No one to fix it though.
>>> 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.
>
> Great. I take it that I am basically on the right track then and that
> when you said cross-platform results without metrics hinting were
> 'fairly robust' you were thinking of that single device pixel.
More or less.
behdad
> many thanks,
> Richard.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]