[style] Fall back to GPOS 'size' feature for optical size in style API
This commit is contained in:
parent
37379f8f7d
commit
a23ce28977
|
@ -112,9 +112,11 @@ hb_style_get_value (hb_font_t *font, hb_tag_t tag)
|
|||
return face->table.OS2->is_italic () || face->table.head->is_italic () ? 1 : 0;
|
||||
case HB_STYLE_TAG_OPTICAL_SIZE:
|
||||
{
|
||||
unsigned int lower, upper;
|
||||
unsigned int lower, design, upper;
|
||||
return face->table.OS2->v5 ().get_optical_size (&lower, &upper)
|
||||
? (float) (lower + upper) / 2.f
|
||||
: hb_ot_layout_get_size_params (face, &design, nullptr, nullptr, nullptr, nullptr)
|
||||
? design / 10.
|
||||
: 12.f;
|
||||
}
|
||||
case HB_STYLE_TAG_SLANT:
|
||||
|
|
Loading…
Reference in New Issue