Index: src/ports/SkFontHost_linux.cpp |
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp |
index b4404ca745eb30fa0389eefb4e94a289a67dd3e1..da2c2d00d14fb92f4c85c44daaea4944a905dfd2 100644 |
--- a/src/ports/SkFontHost_linux.cpp |
+++ b/src/ports/SkFontHost_linux.cpp |
@@ -39,6 +39,7 @@ |
void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const override { |
desc->setFamilyName(fFamilyName.c_str()); |
+ desc->setFontIndex(fIndex); |
*isLocal = !this->isSysFont(); |
} |
@@ -305,7 +306,7 @@ |
bool isFixedPitch; |
SkFontStyle style; |
SkString name; |
- if (fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch, NULL)) { |
+ if (fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch)) { |
return SkNEW_ARGS(SkTypeface_Stream, (style, isFixedPitch, false, name, |
stream.detach(), ttcIndex)); |
} else { |
@@ -404,7 +405,7 @@ |
bool isFixedPitch; |
SkString realname; |
SkFontStyle style = SkFontStyle(); // avoid uninitialized warning |
- if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch, NULL)) { |
+ if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch)) { |
SkDebugf("---- failed to open <%s> <%d> as a font\n", |
filename.c_str(), faceIndex); |
continue; |
@@ -490,7 +491,7 @@ |
bool isFixedPitch; |
SkString realname; |
SkFontStyle style = SkFontStyle(); // avoid uninitialized warning |
- if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch, NULL)) { |
+ if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch)) { |
SkDebugf("---- failed to open <%d> <%d> as a font\n", index, faceIndex); |
return; |
} |