diff options
| author | caryclark <caryclark@google.com> | 2014-06-23 11:25:00 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2014-06-23 11:25:00 -0700 |
| commit | 5fb6bd4b7e8d00b7f2543ca10ec9022b32632f29 (patch) | |
| tree | 9212da1f0a1c6bee32c3debd4b8fd1ff61beca60 /samplecode/SampleApp.cpp | |
| parent | c83780c9ec9fb7dc46abed71a64d83ec0ce7a274 (diff) | |
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
Diffstat (limited to 'samplecode/SampleApp.cpp')
| -rw-r--r-- | samplecode/SampleApp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 2a4ebdce41..df10b1e70b 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -1685,6 +1685,10 @@ static void cleanup_for_filename(SkString* name) { } #endif +namespace sk_tool_utils { + extern bool gEnablePortableTypeface; +}; + bool SampleWindow::onHandleChar(SkUnichar uni) { { SkView* view = curr_view(this); @@ -1738,6 +1742,10 @@ bool SampleWindow::onHandleChar(SkUnichar uni) { // only toggleFPS(); break; + case 'F': + sk_tool_utils::gEnablePortableTypeface ^= true; + this->inval(NULL); + break; case 'g': fRequestGrabImage = true; this->inval(NULL); |
