[name] Skip enumerating names with unknown language

pull/1319/head
Behdad Esfahbod 6 years ago
parent 2c39f359e4
commit 622b014faf
  1. 3
      src/hb-ot-name-table.hh

@ -206,7 +206,8 @@ struct name
unsigned int j = 0; unsigned int j = 0;
for (unsigned int i = 0; i < this->names.len; i++) for (unsigned int i = 0; i < this->names.len; i++)
{ {
if (this->names[i].entry_score == UNSUPPORTED) if (this->names[i].entry_score == UNSUPPORTED ||
this->names[i].language == HB_LANGUAGE_INVALID)
continue; continue;
if (i && if (i &&
this->names[i - 1].name_id == this->names[i].name_id && this->names[i - 1].name_id == this->names[i].name_id &&

Loading…
Cancel
Save