paint.setImageFilter(imf);
paint.setColor(SK_ColorCYAN);
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);
SkPaint::kAntiAlias_Flag | SkPaint::kLCDRenderText_Flag,
};
SkPaint paint(origPaint);
+ sk_tool_utils::set_portable_typeface_always(&paint);
paint.setTextSize(30);
SkAutoCanvasRestore acr(canvas, true);
canvas.clear(SK_ColorTRANSPARENT);
SkPaint paint;
paint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&paint);
+ sk_tool_utils::set_portable_typeface_always(&paint);
paint.setColor(SK_ColorWHITE);
paint.setTextSize(SkIntToScalar(96));
const char* str = "e";
int x = rand.nextULessThan(WIDTH);
int y = rand.nextULessThan(HEIGHT);
SkPaint paint;
- sk_tool_utils::set_portable_typeface(&paint);
- paint.setColor(rand.nextBits(24) | 0xFF000000);
+ sk_tool_utils::set_portable_typeface_always(&paint);
+ paint.setColor(sk_tool_utils::color_to_565(rand.nextBits(24) | 0xFF000000));
paint.setTextSize(rand.nextRangeScalar(0, 300));
paint.setAntiAlias(true);
canvas->drawText(str, strlen(str), SkIntToScalar(x),
};
SkPaint textPaint;
textPaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&textPaint);
+ sk_tool_utils::set_portable_typeface_always(&textPaint);
textPaint.setTextSize(SkIntToScalar(100));
int posY = 0;
for (unsigned i = 0; i < SK_ARRAY_COUNT(str); i++) {