diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2010-04-29 03:48:11 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2010-04-29 03:48:11 -0400 |
commit | 4ac6cc284b2c1eb670c2a3659ec385ed729acac4 (patch) | |
tree | 86b0ec79f06bd4c9704af1d3c6d4648f39a7eae3 | |
parent | b52fbb1bab608bda76efb936f08344afaec600a1 (diff) |
[gdef] Fix rounding
-rw-r--r-- | src/hb-ot-layout-gdef-private.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hb-ot-layout-gdef-private.hh b/src/hb-ot-layout-gdef-private.hh index 46d40ba..5e7c47e 100644 --- a/src/hb-ot-layout-gdef-private.hh +++ b/src/hb-ot-layout-gdef-private.hh @@ -94,7 +94,7 @@ struct CaretValueFormat1 inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id HB_GNUC_UNUSED) const { /* TODO vertical */ - return context->font->x_scale * coordinate / 0x10000; + return _hb_16dot16_mul_round (context->font->x_scale, coordinate); } inline bool sanitize (SANITIZE_ARG_DEF) { @@ -139,7 +139,7 @@ struct CaretValueFormat3 inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id HB_GNUC_UNUSED) const { /* TODO vertical */ - return context->font->x_scale * coordinate / 0x10000 + + return _hb_16dot16_mul_round (context->font->x_scale, coordinate) + ((this+deviceTable).get_delta (context->font->x_ppem) << 6); } |