Fix sbix glyph extents
authorKhaled Hosny <khaledhosny@eglug.org>
Mon, 22 Jul 2019 01:57:24 +0000 (03:57 +0200)
committerKhaled Hosny <khaledhosny@eglug.org>
Mon, 22 Jul 2019 03:42:34 +0000 (05:42 +0200)
commitc9796d15e1ec5f8939f8b1ae368cb3352b6a9cb9
treedcdac05fe9fb6b3f56ad6da339833c8bc249019f
parent759f3bd486c99bb09fb9fa5f42e621ec21399df8
Fix sbix glyph extents

* The ‘height’ needs to be negated since the API returns “distance from
  top to bottom side”.
* Similarly, the ‘y_offset‘ needs to be added to the height to get the
  ‘y_bearing’, since sbix’s offset is “the point in the glyph relative
  to its lower-left corner which corresponds to the origin” while
  ‘y_bearing’ is the “top side of glyph from origin”.

With these changes the sbix glyph metrics return values similar to other
tables, as they were otherwise unusable.
src/hb-ot-color-sbix-table.hh
test/api/test-ot-color.c
test/shaping/data/in-house/fonts/fcbaa518d3cce441ed37ae3b1fed6a19e9b54efd.ttf [new file with mode: 0644]
test/shaping/data/in-house/tests/color-fonts.tests