summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-24 23:05:03 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-24 23:05:03 +0300
commit5f5a9f256cad866172c18939e31162ba038ac02e (patch)
treec0d398d0ae345b40fd7b847057267f4ad1852554 /thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh
parentb3df27526a0374f2fd5f44eab99da4b4bfd9f9ec (diff)
HarfBuzz: Update to version 5.0.1
Diffstat (limited to 'thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh')
-rw-r--r--thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh b/thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh
index 792bd5478f..e4a9168b79 100644
--- a/thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh
+++ b/thirdparty/harfbuzz/src/OT/glyf/GlyphHeader.hh
@@ -14,12 +14,14 @@ struct GlyphHeader
bool has_data () const { return numberOfContours; }
template <typename accelerator_t>
- bool get_extents (hb_font_t *font, const accelerator_t &glyf_accelerator,
- hb_codepoint_t gid, hb_glyph_extents_t *extents) const
+ bool get_extents_without_var_scaled (hb_font_t *font, const accelerator_t &glyf_accelerator,
+ hb_codepoint_t gid, hb_glyph_extents_t *extents) const
{
/* Undocumented rasterizer behavior: shift glyph to the left by (lsb - xMin), i.e., xMin = lsb */
/* extents->x_bearing = hb_min (glyph_header.xMin, glyph_header.xMax); */
- extents->x_bearing = font->em_scale_x (glyf_accelerator.hmtx->get_side_bearing (gid));
+ int lsb = hb_min (xMin, xMax);
+ (void) glyf_accelerator.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb);
+ extents->x_bearing = font->em_scale_x (lsb);
extents->y_bearing = font->em_scale_y (hb_max (yMin, yMax));
extents->width = font->em_scale_x (hb_max (xMin, xMax) - hb_min (xMin, xMax));
extents->height = font->em_scale_y (hb_min (yMin, yMax) - hb_max (yMin, yMax));