Disable sbix if no-color or no-ot-font-bitmap
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
606841b070
commit
32d3c06b61
@ -180,19 +180,20 @@ hb_ot_get_glyph_extents (hb_font_t *font,
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
const hb_ot_face_t *ot_face = (const hb_ot_face_t *) font_data;
|
||||
bool ret = ot_face->sbix->get_extents (font, glyph, extents);
|
||||
if (!ret)
|
||||
ret = ot_face->glyf->get_extents (glyph, extents);
|
||||
bool ret = false;
|
||||
|
||||
#if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR)
|
||||
if (!ret) ot_face->sbix->get_extents (font, glyph, extents);
|
||||
#endif
|
||||
if (!ret) ret = ot_face->glyf->get_extents (glyph, extents);
|
||||
#ifndef HB_NO_OT_FONT_CFF
|
||||
if (!ret)
|
||||
ret = ot_face->cff1->get_extents (glyph, extents);
|
||||
if (!ret)
|
||||
ret = ot_face->cff2->get_extents (font, glyph, extents);
|
||||
if (!ret) ret = ot_face->cff1->get_extents (glyph, extents);
|
||||
if (!ret) ret = ot_face->cff2->get_extents (font, glyph, extents);
|
||||
#endif
|
||||
#ifndef HB_NO_OT_FONT_BITMAP
|
||||
if (!ret)
|
||||
ret = ot_face->CBDT->get_extents (font, glyph, extents);
|
||||
#if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR)
|
||||
if (!ret) ret = ot_face->CBDT->get_extents (font, glyph, extents);
|
||||
#endif
|
||||
|
||||
// TODO Hook up side-bearings variations.
|
||||
extents->x_bearing = font->em_scale_x (extents->x_bearing);
|
||||
extents->y_bearing = font->em_scale_y (extents->y_bearing);
|
||||
|
Loading…
Reference in New Issue
Block a user