Use m_GlyphIndex as backup for m_ExtGID on Mac
When CGFontGetGlyphWithGlyphName returns 0, it means the glyph name
was not recognized. In this case, try using the glyph index to load the
glyph.
BUG=pdfium:625
Review-Url: https://codereview.chromium.org/2445933002
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp
index 211e574..6428c1d 100644
--- a/core/fxge/apple/fx_apple_platform.cpp
+++ b/core/fxge/apple/fx_apple_platform.cpp
@@ -63,7 +63,8 @@
CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars);
CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars);
for (int i = 0; i < nChars; i++) {
- glyph_indices[i] = pCharPos[i].m_ExtGID;
+ glyph_indices[i] =
+ pCharPos[i].m_ExtGID ? pCharPos[i].m_ExtGID : pCharPos[i].m_GlyphIndex;
if (bNegSize)
glyph_positions[i].x = -pCharPos[i].m_OriginX;
else