diff --git a/src/hb-style.cc b/src/hb-style.cc index 2f45d119f..9df0f32ac 100644 --- a/src/hb-style.cc +++ b/src/hb-style.cc @@ -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: