Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.
Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97
Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9
Review URL: https://codereview.chromium.org/1027373002
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
index da2c2d0..b4404ca 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -39,7 +39,6 @@
void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const override {
desc->setFamilyName(fFamilyName.c_str());
- desc->setFontIndex(fIndex);
*isLocal = !this->isSysFont();
}
@@ -306,7 +305,7 @@
bool isFixedPitch;
SkFontStyle style;
SkString name;
- if (fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch)) {
+ if (fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch, NULL)) {
return SkNEW_ARGS(SkTypeface_Stream, (style, isFixedPitch, false, name,
stream.detach(), ttcIndex));
} else {
@@ -405,7 +404,7 @@
bool isFixedPitch;
SkString realname;
SkFontStyle style = SkFontStyle(); // avoid uninitialized warning
- if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch)) {
+ if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch, NULL)) {
SkDebugf("---- failed to open <%s> <%d> as a font\n",
filename.c_str(), faceIndex);
continue;
@@ -491,7 +490,7 @@
bool isFixedPitch;
SkString realname;
SkFontStyle style = SkFontStyle(); // avoid uninitialized warning
- if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch)) {
+ if (!scanner.scanFont(stream, faceIndex, &realname, &style, &isFixedPitch, NULL)) {
SkDebugf("---- failed to open <%d> <%d> as a font\n", index, faceIndex);
return;
}