hb_blob_t* getFontTable(const MinikinFont* minikinFont, uint32_t tag) { assertMinikinLocked(); hb_font_t* font = getHbFontLocked(minikinFont); hb_face_t* face = hb_font_get_face(font); hb_blob_t* blob = hb_face_reference_table(face, tag); hb_font_destroy(font); return blob; }
bool FontFamily::hasGlyph(uint32_t codepoint, uint32_t variationSelector) const { assertMinikinLocked(); if (variationSelector != 0 && !mHasVSTable) { // Early exit if the variation selector is specified but the font doesn't // have a cmap format 14 subtable. return false; } const FontStyle defaultStyle; hb_font_t* font = getHbFontLocked(getClosestMatch(defaultStyle).font); uint32_t unusedGlyph; bool result = hb_font_get_glyph(font, codepoint, variationSelector, &unusedGlyph); hb_font_destroy(font); return result; }