[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 :-).
diff --git a/src/hb-font.h b/src/hb-font.h
index 397b586..d9d6090 100644
--- a/src/hb-font.h
+++ b/src/hb-font.h
@@ -231,13 +231,13 @@
*/
void
hb_font_set_scale (hb_font_t *font,
- unsigned int x_scale,
- unsigned int y_scale);
+ int x_scale,
+ int y_scale);
void
hb_font_get_scale (hb_font_t *font,
- unsigned int *x_scale,
- unsigned int *y_scale);
+ int *x_scale,
+ int *y_scale);
/*
* A zero value means "no hinting in that direction"