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/gyp/dm.gyp b/gyp/dm.gyp
index 2d02796..202757e 100644
--- a/gyp/dm.gyp
+++ b/gyp/dm.gyp
@@ -61,6 +61,7 @@
             'jsoncpp.gyp:jsoncpp',
             'skia_lib.gyp:skia_lib',
             'tools.gyp:crash_handler',
+            'tools.gyp:sk_tool_utils',
         ],
         'conditions': [
           ['skia_android_framework', {
diff --git a/gyp/gm.gyp b/gyp/gm.gyp
index fd56e7e..3676b30 100644
--- a/gyp/gm.gyp
+++ b/gyp/gm.gyp
@@ -33,6 +33,7 @@
         'tools.gyp:crash_handler',
         'tools.gyp:gm_expectations',
         'tools.gyp:resources',
+        'tools.gyp:sk_tool_utils',
       ],
       'conditions': [
         ['skia_android_framework', {
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index 256852d..e16fa4b 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -17,6 +17,7 @@
         'bench_pictures',
         'bench_record',
         'bench_playback',
+        'create_test_font',
         'dump_record',
         'filter',
         'gpuveto',
@@ -90,7 +91,10 @@
     {
       'target_name': 'sk_tool_utils',
       'type': 'static_library',
-      'sources': [ '../tools/sk_tool_utils.cpp' ],
+      'sources': [
+        '../tools/sk_tool_utils.cpp',
+        '../tools/sk_tool_utils_font.cpp',
+      ],
       'dependencies': [
         'skia_lib.gyp:skia_lib',
       ],
@@ -266,6 +270,7 @@
       'include_dirs': [
         # For SkBitmapHasher.h
         '../src/utils/',
+        '../tools/',
       ],
       'dependencies': [
         'gm_expectations',
@@ -621,6 +626,20 @@
       ],
     },
     {
+      'target_name': 'create_test_font',
+      'type': 'executable',
+      'sources': [
+        '../tools/create_test_font.cpp',
+      ],
+      'include_dirs': [
+        '../src/core',
+      ],
+      'dependencies': [
+        'flags.gyp:flags',
+        'skia_lib.gyp:skia_lib',
+      ],
+    },
+    {
       'target_name': 'test_image_decoder',
       'type': 'executable',
       'sources': [
diff --git a/gyp/utils.gypi b/gyp/utils.gypi
index 761fbf7..5fce7c7 100644
--- a/gyp/utils.gypi
+++ b/gyp/utils.gypi
@@ -121,5 +121,7 @@
         #testing
         '<(skia_src_path)/fonts/SkGScalerContext.cpp',
         '<(skia_src_path)/fonts/SkGScalerContext.h',
+        '<(skia_src_path)/fonts/SkTestScalerContext.cpp',
+        '<(skia_src_path)/fonts/SkTestScalerContext.h',
     ],
 }