From: Behdad Esfahbod Date: Thu, 21 May 2009 08:54:01 +0000 (-0400) Subject: [GPOS] Implement Device support in AnchorFormat3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c18ec2b1d7b8c7abe6ebf4b53c9ec75d5c9bb255;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [GPOS] Implement Device support in AnchorFormat3 --- diff --git a/src/hb-ot-layout-gpos-private.h b/src/hb-ot-layout-gpos-private.h index a769004..3d12b36 100644 --- a/src/hb-ot-layout-gpos-private.h +++ b/src/hb-ot-layout-gpos-private.h @@ -176,9 +176,14 @@ struct AnchorFormat3 inline void get_anchor (hb_ot_layout_t *layout, hb_codepoint_t glyph_id, hb_position_t *x, hb_position_t *y) const { - /* TODO Device */ - *x += layout->gpos_info.x_scale * xCoordinate / 0x10000; - *y += layout->gpos_info.y_scale * yCoordinate / 0x10000; + *x = layout->gpos_info.x_scale * xCoordinate / 0x10000; + *y = layout->gpos_info.y_scale * yCoordinate / 0x10000; + + if (!layout->gpos_info.dvi) + { + *x += (this+xDeviceTable).get_delta (layout->gpos_info.x_ppem) << 6; + *y += (this+yDeviceTable).get_delta (layout->gpos_info.y_ppem) << 6; + } } private: