|
|
|
@ -160,9 +160,20 @@ hb_ot_metrics_get_position (hb_font_t *font, |
|
|
|
|
(position && (*position = font->em_scalef_y (face->table.TABLE->ATTR + GET_VAR)), true)) |
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT: return GET_METRIC_Y (OS2, usWinAscent); |
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT: return GET_METRIC_Y (OS2, usWinDescent); |
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE: return GET_METRIC_Y (hhea, caretSlopeRise); |
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CARET_RUN: return GET_METRIC_X (hhea, caretSlopeRun); |
|
|
|
|
|
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE: |
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CARET_RUN: |
|
|
|
|
{ |
|
|
|
|
unsigned rise = face->table.hhea->caretSlopeRise; |
|
|
|
|
unsigned upem = face->get_upem (); |
|
|
|
|
unsigned mult = rise < upem ? upem / rise : 1; |
|
|
|
|
if (metrics_tag == HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE) |
|
|
|
|
return mult * GET_METRIC_Y (hhea, caretSlopeRise); |
|
|
|
|
else |
|
|
|
|
return mult * GET_METRIC_X (hhea, caretSlopeRun); |
|
|
|
|
} |
|
|
|
|
case HB_OT_METRICS_TAG_HORIZONTAL_CARET_OFFSET: return GET_METRIC_X (hhea, caretOffset); |
|
|
|
|
|
|
|
|
|
#ifndef HB_NO_VERTICAL |
|
|
|
|
case HB_OT_METRICS_TAG_VERTICAL_CARET_RISE: return GET_METRIC_X (vhea, caretSlopeRise); |
|
|
|
|
case HB_OT_METRICS_TAG_VERTICAL_CARET_RUN: return GET_METRIC_Y (vhea, caretSlopeRun); |
|
|
|
|