提交 54b9ab70 编写于 作者: E Ebrahim Byagowi

Fallback hhea's ascender/descender to OS2

上级 ec8dde81
......@@ -60,14 +60,14 @@ hb_ot_metrics_get_position_internal (hb_face_t *face,
(face->table.TABLE->has_data () && \
(position && (*position = face->table.TABLE->ATTR + GET_VAR), true))
case HB_OT_METRICS_HORIZONTAL_ASCENDER:
return (face->table.OS2->use_typo_metrics () && GET_METRIC (OS2, sTypoAscender)) ||
GET_METRIC (hhea, ascender);
return (!face->table.OS2->use_typo_metrics () && GET_METRIC (hhea, ascender)) ||
GET_METRIC (OS2, sTypoAscender);
case HB_OT_METRICS_HORIZONTAL_DESCENDER:
return (face->table.OS2->use_typo_metrics () && GET_METRIC (OS2, sTypoDescender)) ||
GET_METRIC (hhea, descender);
return (!face->table.OS2->use_typo_metrics () && GET_METRIC (hhea, descender)) ||
GET_METRIC (OS2, sTypoDescender);
case HB_OT_METRICS_HORIZONTAL_LINE_GAP:
return (face->table.OS2->use_typo_metrics () && GET_METRIC (OS2, sTypoLineGap)) ||
GET_METRIC (hhea, lineGap);
return (!face->table.OS2->use_typo_metrics () && GET_METRIC (hhea, lineGap)) ||
GET_METRIC (OS2, sTypoLineGap);
case HB_OT_METRICS_HORIZONTAL_CLIPPING_ASCENT: return GET_METRIC (OS2, usWinAscent);
case HB_OT_METRICS_HORIZONTAL_CLIPPING_DESCENT: return GET_METRIC (OS2, usWinDescent);
case HB_OT_METRICS_VERTICAL_ASCENDER: return GET_METRIC (vhea, ascender);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册