[ot-font] Respect OS/2 fsSelection USE_TYPO_METRICS bit
This commit is contained in:
parent
6f2e6de1fa
commit
3ad16048fd
|
@ -62,12 +62,16 @@ struct hb_ot_face_metrics_accelerator_t
|
|||
{
|
||||
hb_blob_t *os2_blob = OT::Sanitizer<OT::os2>::sanitize (face->reference_table (os2_tag));
|
||||
const OT::os2 *os2 = OT::Sanitizer<OT::os2>::lock_instance (os2_blob);
|
||||
#define USE_TYPO_METRICS (1u<<7)
|
||||
if (0 != (os2->fsSelection & USE_TYPO_METRICS))
|
||||
{
|
||||
this->ascender = os2->sTypoAscender;
|
||||
this->descender = os2->sTypoDescender;
|
||||
this->line_gap = os2->sTypoLineGap;
|
||||
hb_blob_destroy (os2_blob);
|
||||
got_font_extents = (this->ascender | this->descender) != 0;
|
||||
}
|
||||
hb_blob_destroy (os2_blob);
|
||||
}
|
||||
|
||||
hb_blob_t *_hea_blob = OT::Sanitizer<OT::_hea>::sanitize (face->reference_table (_hea_tag));
|
||||
const OT::_hea *_hea = OT::Sanitizer<OT::_hea>::lock_instance (_hea_blob);
|
||||
|
|
Loading…
Reference in New Issue