glyphIndexMap has more accurate unicode -> glyph mapping, especial for glyphs which has multiple unicode values.
e.g. A Chinese Charater 心 which char code is 24515 does not in the glyph list of PingFang-SC (it's the default Chinese font family on macOS) when searching with glyph.unicode. But it do exists in the font family and can be found in glyphIndexMap
glyphIndexMap
has more accurate unicode -> glyph mapping, especial for glyphs which has multiple unicode values. e.g. A Chinese Charater心
which char code is24515
does not in the glyph list ofPingFang-SC
(it's the default Chinese font family on macOS) when searching withglyph.unicode
. But it do exists in the font family and can be found inglyphIndexMap