[API] Allow negative font x_scale/y_scale
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 21 Apr 2011 19:08:01 +0000 (15:08 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 21 Apr 2011 19:15:02 +0000 (15:15 -0400)
commitda975419884a535281745f30f4b32fee0bc8a7a1
treea50be38837eab3cfaad2f2acd98e4b67aed1a36b
parent4d559cddbb3b3a5c12c5167eba69598618a9f283
[API] Allow negative font x_scale/y_scale

I was reconsidering whether y should grow down, since all three/four
times I've used this API I was tricked and got that wrong in my use.
So I was very inclined to make y grow down instead of up.  However,
considering that the font space has y up and it would be very confusing
for callbacks to work against that, I decided that what I really want
is for the user to be able to set y_scale to a negative number to imply
that user-space y grows down.

Changing x_scale/y_scale from unsigned int to int allows that, and I've
made pango to use that instead of negating glyph y_offset later.  hb-ft
however still has y group up.  I *guess* that's how FreeType works?
I'm not sure, FreeType docs don't make this clear...

I'm happy with the resolution :-).
src/hb-font.cc
src/hb-font.h
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-private.hh