diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 21ca3c08d..8fa6012e7 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -186,7 +186,7 @@ hb_ot_get_glyph_extents (hb_font_t *font, #if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR) if (!ret) ret = ot_face->sbix->get_extents (font, glyph, extents); #endif - if (!ret) ret = ot_face->glyf->get_extents (glyph, extents); + if (!ret) ret = ot_face->glyf->get_extents (font, glyph, extents); #ifndef HB_NO_OT_FONT_CFF if (!ret) ret = ot_face->cff1->get_extents (glyph, extents); if (!ret) ret = ot_face->cff2->get_extents (font, glyph, extents); diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 90addc46b..68ca973ee 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -691,10 +691,10 @@ struct glyf void add (const contour_point_t &p) { - min.x = MIN (min.x, p.x); - min.y = MIN (min.y, p.y); - max.x = MAX (max.x, p.x); - max.y = MAX (max.y, p.y); + min.x = hb_min (min.x, p.x); + min.y = hb_min (min.y, p.y); + max.x = hb_max (max.x, p.x); + max.y = hb_max (max.y, p.y); } bool empty () const { return (min.x >= max.x) || (min.y >= max.y); } diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 1b09d8d9c..bae18b807 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -139,7 +139,7 @@ struct hmtxvmtx if (c->plan->old_gid_for_new_gid (_, &old_gid)) return hb_pair (_mtx.get_advance (old_gid), _mtx.get_side_bearing (old_gid)); else - return hb_pair (0u, 0u); + return hb_pair (0u, 0); }) ; diff --git a/src/hb-ot-var-gvar-table.hh b/src/hb-ot-var-gvar-table.hh index c34c9aed4..0c563b74b 100644 --- a/src/hb-ot-var-gvar-table.hh +++ b/src/hb-ot-var-gvar-table.hh @@ -164,7 +164,7 @@ struct TupleVarHeader else { if (peak != end) scalar *= (float)(end - v) / (end - peak); } } - else if (!v || v < MIN (0, peak) || v > MAX (0, peak)) return 0.f; + else if (!v || v < hb_min (0, peak) || v > hb_max (0, peak)) return 0.f; else scalar *= (float)v / peak; } @@ -567,9 +567,9 @@ struct gvar if (prev_val == next_val) return (prev_delta == next_delta)? prev_delta: 0.f; - else if (target_val <= MIN (prev_val, next_val)) + else if (target_val <= hb_min (prev_val, next_val)) return (prev_val < next_val) ? prev_delta: next_delta; - else if (target_val >= MAX (prev_val, next_val)) + else if (target_val >= hb_max (prev_val, next_val)) return (prev_val > next_val)? prev_delta: next_delta; /* linear interpolation */ diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh index 49f241c3f..be00f49e2 100644 --- a/src/hb-ot-var-hvar-table.hh +++ b/src/hb-ot-var-hvar-table.hh @@ -159,7 +159,7 @@ struct index_map_subset_plan_t unsigned int last_val = (unsigned int)-1; hb_codepoint_t last_gid = (hb_codepoint_t)-1; - hb_codepoint_t gid = (hb_codepoint_t)MIN(index_map.get_map_count (), plan->num_output_glyphs ()); + hb_codepoint_t gid = (hb_codepoint_t) hb_min (index_map.get_map_count (), plan->num_output_glyphs ()); outer_bit_count = (index_map.get_width () * 8) - index_map.get_inner_bit_count (); max_inners.resize (inner_maps.length);