Index: gm/pixelsnap.cpp |
diff --git a/gm/pixelsnap.cpp b/gm/pixelsnap.cpp |
index 8a513f3ca5409725def3c39ea2bb0c08a6d62c3a..cae501b54ccddae61349f8db4a220edff9ede3f9 100644 |
--- a/gm/pixelsnap.cpp |
+++ b/gm/pixelsnap.cpp |
@@ -43,33 +43,31 @@ protected: |
labelPaint.setAntiAlias(true); |
labelPaint.setColor(SK_ColorWHITE); |
labelPaint.setTextSize(SkIntToScalar(kLabelTextSize)); |
+ sk_tool_utils::set_portable_typeface(&labelPaint); |
SkPaint linePaint; |
linePaint.setColor(SK_ColorWHITE); |
- // Drawing labels is useful for debugging, but bad for baselining (x-platform txt diffs). |
- if (false) { |
- // Draw row labels |
- canvas->save(); |
- canvas->translate(0, SkIntToScalar(kLabelOffsetY)); |
- for (int i = 0; i <= kSubPixelSteps; ++i) { |
- offset.printf("%d", i); |
- canvas->drawText(offset.c_str(), offset.size(), |
- 0, i * kTrans + labelPaint.getTextSize(), |
- labelPaint); |
- } |
- canvas->restore(); |
- |
- // Draw col labels |
- canvas->save(); |
- canvas->translate(SkIntToScalar(kLabelOffsetX), 0); |
- for (int i = 0; i <= kSubPixelSteps; ++i) { |
- offset.printf("%d", i); |
- canvas->drawText(offset.c_str(), offset.size(), |
- i * SkIntToScalar(kTrans), labelPaint.getTextSize(), |
- labelPaint); |
- } |
- canvas->restore(); |
- } |
+ // Draw row labels |
+ canvas->save(); |
+ canvas->translate(0, SkIntToScalar(kLabelOffsetY)); |
+ for (int i = 0; i <= kSubPixelSteps; ++i) { |
+ offset.printf("%d", i); |
+ canvas->drawText(offset.c_str(), offset.size(), |
+ 0, i * kTrans + labelPaint.getTextSize(), |
+ labelPaint); |
+ } |
+ canvas->restore(); |
+ |
+ // Draw col labels |
+ canvas->save(); |
+ canvas->translate(SkIntToScalar(kLabelOffsetX), 0); |
+ for (int i = 0; i <= kSubPixelSteps; ++i) { |
+ offset.printf("%d", i); |
+ canvas->drawText(offset.c_str(), offset.size(), |
+ i * SkIntToScalar(kTrans), labelPaint.getTextSize(), |
+ labelPaint); |
+ } |
+ canvas->restore(); |
canvas->translate(SkIntToScalar(kLabelOffsetX), SkIntToScalar(kLabelOffsetY)); |