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

Unified Diff: gm/typeface.cpp

Issue 2140863002: Use hintgasp font when testing rendering. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | resources/fonts/hintgasp.ttf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/typeface.cpp
diff --git a/gm/typeface.cpp b/gm/typeface.cpp
index 8b6a64866bb259291f3e7c2557a12e205a3ccffe..34420dbee1868d177ec256977528cafb72546933 100644
--- a/gm/typeface.cpp
+++ b/gm/typeface.cpp
@@ -180,7 +180,7 @@ protected:
}
SkISize onISize() override {
- return SkISize::Make(640, 480);
+ return SkISize::Make(640, 680);
}
void onDraw(SkCanvas* canvas) override {
@@ -204,7 +204,8 @@ protected:
// GASP_DOGRAY|GASP_GRIDFIT 0x0003 13<=ppem<=14
// GASP_SYMMETRIC_SMOOTHING|GASP_SYMMETRIC_GRIDFIT 0x000C 13<=ppem<=14
// (neither) 0x0000 15<=ppem
- constexpr SkScalar textSizes[] = { 10, 12, 14, 16 };
+ // Odd sizes have embedded bitmaps.
+ constexpr SkScalar textSizes[] = { 9, 10, 11, 12, 13, 14, 15, 16 };
constexpr SkPaint::Hinting hintingTypes[] = { SkPaint::kNo_Hinting,
SkPaint::kSlight_Hinting,
@@ -224,6 +225,9 @@ protected:
constexpr bool rotateABitTypes[] = { false, true };
SkPaint paint;
+ paint.setTypeface(fFace);
+ paint.setEmbeddedBitmapText(true);
+
SkScalar x = 0;
SkScalar xMax = x;
SkScalar xBase = 0;
« no previous file with comments | « no previous file | resources/fonts/hintgasp.ttf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698