[name] Default to "en" if language is not specified

This commit is contained in:
Behdad Esfahbod 2018-10-25 13:43:25 -07:00
parent 3fd6e5dbef
commit c965eeadbc
1 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,9 @@ hb_ot_name_get_utf (hb_face_t *face,
{
const OT::name_accelerator_t &name = _get_name (face);
if (!language)
language = hb_language_from_string ("en", 2);
unsigned int width;
int idx = name.get_index (name_id, language, &width);
if (idx != -1)