make varied_text* gm portable

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1244063002
This commit is contained in:
caryclark 2015-07-21 09:15:53 -07:00 committed by Commit bot
parent 02781977e0
commit ae3714f27a

View File

@ -59,10 +59,10 @@ protected:
SkScalar h = SkIntToScalar(size.fHeight);
SK_COMPILE_ASSERT(4 == SK_ARRAY_COUNT(fTypefacesToUnref), typeface_cnt);
fTypefacesToUnref[0] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kNormal);
fTypefacesToUnref[1] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kBold);
fTypefacesToUnref[2] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal);
fTypefacesToUnref[3] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold);
fTypefacesToUnref[0] = sk_tool_utils::create_portable_typeface_always("sans-serif", SkTypeface::kNormal);
fTypefacesToUnref[1] = sk_tool_utils::create_portable_typeface_always("sans-serif", SkTypeface::kBold);
fTypefacesToUnref[2] = sk_tool_utils::create_portable_typeface_always("serif", SkTypeface::kNormal);
fTypefacesToUnref[3] = sk_tool_utils::create_portable_typeface_always("serif", SkTypeface::kBold);
SkRandom random;
for (int i = 0; i < kCnt; ++i) {
@ -75,6 +75,7 @@ protected:
fColors[i] = random.nextU();
fColors[i] |= 0xFF000000;
fColors[i] = sk_tool_utils::color_to_565(fColors[i]);
static const SkScalar kMinPtSize = 8.f;
static const SkScalar kMaxPtSize = 32.f;