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

Unified Diff: samplecode/SampleFontScalerTest.cpp

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Android fix + nit fix Created 4 years, 7 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
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFontScalerTest.cpp
diff --git a/samplecode/SampleFontScalerTest.cpp b/samplecode/SampleFontScalerTest.cpp
index 72371ed8073004f8f10a38f8e0e4d6d0b8621098..bd9309790e3be851a8c62d63439c6dcc470f2c1e 100644
--- a/samplecode/SampleFontScalerTest.cpp
+++ b/samplecode/SampleFontScalerTest.cpp
@@ -41,7 +41,8 @@ class FontScalerTestView : public SampleView {
public:
FontScalerTestView() {
for (int i = 0; i < gFaceCount; i++) {
- fFaces[i] = SkTypeface::MakeFromName(gFaces[i].fName, gFaces[i].fStyle);
+ fFaces[i] = SkTypeface::MakeFromName(
+ gFaces[i].fName, SkFontStyle::FromOldStyle(gFaces[i].fStyle));
}
// this->setBGColor(0xFFDDDDDD);
}
@@ -85,7 +86,7 @@ protected:
// paint.setSubpixelText(true);
paint.setAntiAlias(true);
paint.setLCDRenderText(true);
- paint.setTypeface(SkTypeface::MakeFromName("Times Roman", SkTypeface::kNormal));
+ paint.setTypeface(SkTypeface::MakeFromName("Times Roman", SkFontStyle()));
// const char* text = "abcdefghijklmnopqrstuvwxyz";
const char* text = "Hamburgefons ooo mmm";
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698