summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-10-28 23:44:53 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-10-28 23:44:53 +0000
commit65b88a70ed4a3b2ee8da094d317b3d8119aec1d7 (patch)
tree9b8c76c1afc603f7bcb0377efabd7b06cdd43e5d /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc
parent1631aaed733bf2365f99084b46113a982d918ebc (diff)
harfbuzz-2.6.3
git-svn-id: svn://tug.org/texlive/trunk@52560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc
index 3e4fc204f34..d1e46256265 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc
@@ -203,8 +203,7 @@ struct bounds_t
}
}
- bool empty () const
- { return (min.x >= max.x) || (min.y >= max.y); }
+ bool empty () const { return (min.x >= max.x) || (min.y >= max.y); }
point_t min;
point_t max;
@@ -219,12 +218,12 @@ struct cff1_extents_param_t
bounds.init ();
}
- void start_path () { path_open = true; }
- void end_path () { path_open = false; }
+ void start_path () { path_open = true; }
+ void end_path () { path_open = false; }
bool is_path_open () const { return path_open; }
- bool path_open;
- bounds_t bounds;
+ bool path_open;
+ bounds_t bounds;
const OT::cff1::accelerator_t *cff;
};
@@ -307,14 +306,14 @@ bool _get_bounds (const OT::cff1::accelerator_t *cff, hb_codepoint_t glyph, boun
return true;
}
-bool OT::cff1::accelerator_t::get_extents (hb_codepoint_t glyph, hb_glyph_extents_t *extents) const
+bool OT::cff1::accelerator_t::get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const
{
#ifdef HB_NO_OT_FONT_CFF
/* XXX Remove check when this code moves to .hh file. */
return true;
#endif
- bounds_t bounds;
+ bounds_t bounds;
if (!_get_bounds (this, glyph, bounds))
return false;
@@ -326,8 +325,8 @@ bool OT::cff1::accelerator_t::get_extents (hb_codepoint_t glyph, hb_glyph_extent
}
else
{
- extents->x_bearing = (int32_t)bounds.min.x.floor ();
- extents->width = (int32_t)bounds.max.x.ceil () - extents->x_bearing;
+ extents->x_bearing = font->em_scalef_x (bounds.min.x.to_real ());
+ extents->width = font->em_scalef_x (bounds.max.x.to_real () - bounds.min.x.to_real ());
}
if (bounds.min.y >= bounds.max.y)
{
@@ -336,8 +335,8 @@ bool OT::cff1::accelerator_t::get_extents (hb_codepoint_t glyph, hb_glyph_extent
}
else
{
- extents->y_bearing = (int32_t)bounds.max.y.ceil ();
- extents->height = (int32_t)bounds.min.y.floor () - extents->y_bearing;
+ extents->y_bearing = font->em_scalef_y (bounds.max.y.to_real ());
+ extents->height = font->em_scalef_x (bounds.min.y.to_real () - bounds.max.y.to_real ());
}
return true;