Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 1027373002: Font variations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkTypeface.cpp ('K') | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index a0e45facf6b88c67dbb64d84fb2f07d0e7cbe261..3e2974660d2a7e65dc824c828f43141366541254 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -387,7 +387,7 @@ public:
}
void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE {
- desc->setFontIndex(fIndex);
+ desc->getFontParameters().fIndex = fIndex;
*serialize = true;
}
@@ -396,6 +396,13 @@ public:
return fStream->duplicate();
}
+ SkStreamAsset* onOpenStream2(SkFontParameters* fontParams) const SK_OVERRIDE {
bungeman-skia 2015/03/23 21:59:05 Temporary implementation to just muck about with t
+ fontParams->fIndex = fIndex;
+ fontParams->fAxis.reset(1);
+ fontParams->fAxis[0] = SK_Fixed1;
+ return fStream->duplicate();
+ };
+
private:
SkAutoTDelete<SkStreamAsset> fStream;
int fIndex;
@@ -421,7 +428,7 @@ public:
desc->setFullName(get_string(fPattern, FC_FULLNAME));
desc->setPostscriptName(get_string(fPattern, FC_POSTSCRIPT_NAME));
desc->setFontFileName(get_string(fPattern, FC_FILE));
- desc->setFontIndex(get_int(fPattern, FC_INDEX, 0));
+ desc->getFontParameters().fIndex = get_int(fPattern, FC_INDEX, 0);
*serialize = false;
}
« src/core/SkTypeface.cpp ('K') | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698