[pango/harfbuzz-ng] [GPOS] Implement Device support in AnchorFormat3
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Subject: [pango/harfbuzz-ng] [GPOS] Implement Device support in AnchorFormat3
- Date: Thu, 21 May 2009 14:14:35 -0400 (EDT)
commit 164137a18e4b10c240c8d63bf676872cfdc934c3
Author: Behdad Esfahbod <behdad behdad org>
Date: Thu May 21 04:54:01 2009 -0400
[GPOS] Implement Device support in AnchorFormat3
---
pango/opentype/hb-ot-layout-gpos-private.h | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pango/opentype/hb-ot-layout-gpos-private.h b/pango/opentype/hb-ot-layout-gpos-private.h
index a769004..3d12b36 100644
--- a/pango/opentype/hb-ot-layout-gpos-private.h
+++ b/pango/opentype/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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]