Re: Pango crossplatform layout size query




On 9/04/2010, at 7:57 AM, Behdad Esfahbod wrote:

On 04/08/2010 03:45 PM, Richard Procter wrote:
??  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 :).

Sorry, I didn't realise. (multiple personalities, eh? :)

If metrics hinting is ON, then quantization happens -> device- dependent.
If metrics hinting is OFF, no quantization -> device-independent.

I think my (naive) thought process was:

  glyph hinting alters font metrics &
  metrics hinting applies to /these altered metrics/
->
  metrics hinting does not achieve constant width layout

For me, the key to clarity is not quantisation per se but whether or
not the layout calculations try to minimise inter-glyph spacing error
arising from the limited precision of the device, so as to buy better
glyph spacing at the cost of a device-dependent layout width. (Of
course, I may be clearly having the wrong idea :).

I suspect that 'quantisation' carries those connotations for you and
so the ambiguity doesn't arise.

Nope. Quartz one doesn't respect the flags either. Just happens that Apple
doesn't quantize, while Microsoft does.

Ah, yes. My mistake.

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 you or anyone else can give me some pointers of what the issue is
and the most likely place to begin, I should be able to commit up to
a couple of days to fixing this. I know little about pango but I'm a
fairly experienced programmer - a degree in computer science,
experience developing telco-grade switching systems, an obscure
network driver in the linux kernel (3c527), symbolic AI stuff, etc.

I will also raise the bug, if only to document its existence for
others requiring stable cross-platform layout.

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.

I'd prefer a categorical answer if possible as to whether I can
rely on pango to provide at most one pixel difference cross-platform
with metrics hinting off, as I want to be sure that this is a viable
solution before I commit to it, so as to minimise rework and to
avoid inconveniencing my users.


best regards,
Richard.


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