use platform-independent font for gm
Create a custom typeface and scaler to render simple paths the
same on all platforms.
GM tests are modified to explicitly select the custom typeface.
R=reed@google.com, mtklein@google.com, bungeman@google.com
TBR=reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/348323003
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 2a4ebdc..df10b1e 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1685,6 +1685,10 @@
}
#endif
+namespace sk_tool_utils {
+ extern bool gEnablePortableTypeface;
+};
+
bool SampleWindow::onHandleChar(SkUnichar uni) {
{
SkView* view = curr_view(this);
@@ -1738,6 +1742,10 @@
// only
toggleFPS();
break;
+ case 'F':
+ sk_tool_utils::gEnablePortableTypeface ^= true;
+ this->inval(NULL);
+ break;
case 'g':
fRequestGrabImage = true;
this->inval(NULL);