more coding style fixes

This commit is contained in:
blueshade7 2019-11-26 10:24:32 -08:00 committed by Behdad Esfahbod
parent 2e7c1239c8
commit 82545c5e2b
1 changed files with 9 additions and 10 deletions

View File

@ -183,22 +183,21 @@ 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 = false;
#if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR)
if (!ret) ret = ot_face->sbix->get_extents (font, glyph, extents);
if (ot_face->sbix->get_extents (font, glyph, extents)) return true;
#endif
if (!ret) ret = ot_face->glyf->get_extents (font, glyph, extents);
if (ot_face->glyf->get_extents (font, glyph, extents)) return true;
#ifndef HB_NO_OT_FONT_CFF
if (!ret) ret = ot_face->cff1->get_extents (font, glyph, extents);
if (!ret) ret = ot_face->cff2->get_extents (font, glyph, extents);
if (ot_face->cff1->get_extents (font, glyph, extents)) return true;
if (ot_face->cff2->get_extents (font, glyph, extents)) return true;
#endif
#if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR)
if (!ret) ret = ot_face->CBDT->get_extents (font, glyph, extents);
if (ot_face->CBDT->get_extents (font, glyph, extents)) return true;
#endif
// TODO Hook up side-bearings variations.
return ret;
return false;
}
#ifndef HB_NO_OT_FONT_GLYPH_NAMES
@ -224,11 +223,11 @@ hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED,
void *user_data HB_UNUSED)
{
const hb_ot_face_t *ot_face = (const hb_ot_face_t *) font_data;
hb_bool_t ret = ot_face->post->get_glyph_from_name (name, len, glyph);
if (ot_face->post->get_glyph_from_name (name, len, glyph)) return true;
#ifndef HB_NO_OT_FONT_CFF
if (!ret) ret = ot_face->cff1->get_glyph_from_name (name, len, glyph);
if (ot_face->cff1->get_glyph_from_name (name, len, glyph)) return true;
#endif
return ret;
return false;
}
#endif