next batch of portable typeface changes

TBR=djsollen@google.com

Review URL: https://codereview.chromium.org/1177303005
This commit is contained in:
caryclark 2015-06-12 05:42:58 -07:00 committed by Commit bot
parent 0a24297be4
commit ceadfefb93
3 changed files with 4 additions and 3 deletions

View File

@ -66,6 +66,7 @@ static void color_wheel_native(SkCanvas* canvas) {
SkAutoCanvasRestore autoCanvasRestore(canvas, true);
canvas->translate(0.5f * SCALE, 0.5f * SCALE);
SkPaint p;
sk_tool_utils::set_portable_typeface_always(&p);
p.setAntiAlias(false);
p.setColor(SK_ColorWHITE);
canvas->drawCircle(0.0f, 0.0f, SCALE * 0.5f, p);
@ -156,7 +157,7 @@ DEF_SIMPLE_GM(all_bitmap_configs, canvas, SCALE, 6 * SCALE) {
SkPaint p;
p.setColor(SK_ColorBLACK);
p.setAntiAlias(true);
sk_tool_utils::set_portable_typeface(&p, NULL);
sk_tool_utils::set_portable_typeface_always(&p, NULL);
sk_tool_utils::draw_checkerboard(canvas, SK_ColorLTGRAY, SK_ColorWHITE, 8);

View File

@ -40,7 +40,7 @@ protected:
SkPaint paint;
paint.setAntiAlias(true);
sk_tool_utils::set_portable_typeface(&paint);
sk_tool_utils::set_portable_typeface_always(&paint);
paint.setTextSize(SkIntToScalar(25));
canvas->translate(SkIntToScalar(-40), SkIntToScalar(0));

View File

@ -44,7 +44,7 @@ static void draw_text(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
paint.setImageFilter(imf);
paint.setColor(SK_ColorGREEN);
paint.setAntiAlias(true);
sk_tool_utils::set_portable_typeface(&paint);
sk_tool_utils::set_portable_typeface_always(&paint);
paint.setTextSize(r.height()/2);
paint.setTextAlign(SkPaint::kCenter_Align);
canvas->drawText("Text", 4, r.centerX(), r.centerY(), paint);