mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 23:11:04 +01:00
[metrics] Only scale caret rise/run if font is slanted
This commit is contained in:
1 parent
45c2b6e384
commit
f1ba1f940f
1 file changed
+1
-1
@@ -166,7 +166,7 @@ hb_ot_metrics_get_position (hb_font_t *font,
|
||||
{
|
||||
unsigned rise = face->table.hhea->caretSlopeRise;
|
||||
unsigned upem = face->get_upem ();
|
||||
unsigned mult = (rise && rise < upem) ? hb_min (upem / rise, 256u) : 1u;
|
||||
unsigned mult = (font->slant && rise && rise < upem) ? hb_min (upem / rise, 256u) : 1u;
|
||||
|
||||
if (metrics_tag == HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE)
|
||||
return mult * GET_METRIC_Y (hhea, caretSlopeRise);
|
||||
|
||||
Reference in new issue
Block a user