[ot-font] Prefer symbol cmap subtable if found
Fixes https://github.com/harfbuzz/harfbuzz/issues/1918 Hopefully doesn't break anyone...
This commit is contained in:
parent
2a3d4987a7
commit
d304d60e4d
|
@ -993,6 +993,15 @@ struct cmap
|
||||||
|
|
||||||
const CmapSubtable *subtable;
|
const CmapSubtable *subtable;
|
||||||
|
|
||||||
|
/* Symbol subtable.
|
||||||
|
* Prefer symbol if available.
|
||||||
|
* https://github.com/harfbuzz/harfbuzz/issues/1918 */
|
||||||
|
if ((subtable = this->find_subtable (3, 0)))
|
||||||
|
{
|
||||||
|
if (symbol) *symbol = true;
|
||||||
|
return subtable;
|
||||||
|
}
|
||||||
|
|
||||||
/* 32-bit subtables. */
|
/* 32-bit subtables. */
|
||||||
if ((subtable = this->find_subtable (3, 10))) return subtable;
|
if ((subtable = this->find_subtable (3, 10))) return subtable;
|
||||||
if ((subtable = this->find_subtable (0, 6))) return subtable;
|
if ((subtable = this->find_subtable (0, 6))) return subtable;
|
||||||
|
@ -1005,13 +1014,6 @@ struct cmap
|
||||||
if ((subtable = this->find_subtable (0, 1))) return subtable;
|
if ((subtable = this->find_subtable (0, 1))) return subtable;
|
||||||
if ((subtable = this->find_subtable (0, 0))) return subtable;
|
if ((subtable = this->find_subtable (0, 0))) return subtable;
|
||||||
|
|
||||||
/* Symbol subtable. */
|
|
||||||
if ((subtable = this->find_subtable (3, 0)))
|
|
||||||
{
|
|
||||||
if (symbol) *symbol = true;
|
|
||||||
return subtable;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Meh. */
|
/* Meh. */
|
||||||
return &Null (CmapSubtable);
|
return &Null (CmapSubtable);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue