aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-11-03 12:25:19 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-06 15:09:09 +0000
commit97f0bc6a1a0d14fd7b9041c39449966535f9f431 (patch)
tree0c2e5006c58bd843d44d628871d3f1150e224e44
parent7a13d871ca54024474ebba9118766f87fac7b3d5 (diff)
clean up cruft about --portableFonts and --resourceFonts
--portableFonts exists but does nothing. --resourceFonts doesn't even exist. Change-Id: I7880208de4aaa9674ba720b9e70c34c145561ac0 Reviewed-on: https://skia-review.googlesource.com/67800 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
-rw-r--r--public.bzl1
-rw-r--r--samplecode/SampleApp.cpp6
-rw-r--r--site/dev/testing/fonts.md84
-rw-r--r--tools/sk_tool_utils.cpp3
-rw-r--r--tools/sk_tool_utils_flags.h16
5 files changed, 0 insertions, 110 deletions
diff --git a/public.bzl b/public.bzl
index 3cd08fee6a..95f94c31ec 100644
--- a/public.bzl
+++ b/public.bzl
@@ -452,7 +452,6 @@ DM_SRCS_ALL = struct(
"tools/random_parse_path.h",
"tools/sk_tool_utils.cpp",
"tools/sk_tool_utils.h",
- "tools/sk_tool_utils_flags.h",
"tools/sk_tool_utils_font.cpp",
"tools/test_font_monospace.inc",
"tools/test_font_sans_serif.inc",
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index b7d080cfbc..613869bb3c 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1843,8 +1843,6 @@ bool SampleWindow::onQuery(SkEvent* query) {
return this->INHERITED::onQuery(query);
}
-DECLARE_bool(portableFonts);
-
bool SampleWindow::onHandleChar(SkUnichar uni) {
{
SkView* view = curr_view(this);
@@ -1950,10 +1948,6 @@ bool SampleWindow::onHandleChar(SkUnichar uni) {
// only
toggleFPS();
break;
- case 'F':
- FLAGS_portableFonts ^= true;
- this->inval(nullptr);
- break;
case 'g':
fRequestGrabImage = true;
this->inval(nullptr);
diff --git a/site/dev/testing/fonts.md b/site/dev/testing/fonts.md
index 5772f28f3a..15e7727041 100644
--- a/site/dev/testing/fonts.md
+++ b/site/dev/testing/fonts.md
@@ -11,58 +11,6 @@ been introduced.
The gm tests have a secondary purpose: they detect when rendering is different
across platforms and configurations.
-The dm \(Diamond Master\) tool supports flags that minimize or eliminate the
-differences introduced by the font scaler native to each platform.
-
-
-Portable fonts
---------------
-
-The most portable font format uses Skia to draw characters directly from paths,
-and contains a idealized set of font metrics. This does not exercise platform
-specific fonts at all, but does support specifying the font name, font size,
-font style, and attributes like fakeBold. The paths are generated on a reference
-platform \(currently a Mac\) and are stored as data in
-'tools/test_font_data.cpp' .
-
-To use portable fonts, pass '\-\-portableFonts' to dm.
-
-
-Resource fonts
---------------
-
-The '\-\-resourceFonts' flag directs dm to use font files present in the resources
-directory. By using the same font set on all buildbots, the generated gm images
-become more uniform across platforms.
-
-Today, the set of fonts used by gm, and present in my resources directory,
-include:
-
- * Courier New Bold Italic.ttf
- * Courier New Bold.ttf
- * Courier New Italic.ttf
- * Courier New.ttf
- * LiberationSans-Bold.ttf
- * LiberationSans-BoldItalic.ttf
- * LiberationSans-Italic.ttf
- * LiberationSans-Regular.ttf
- * Papyrus.ttc
- * Pro W4.otf
- * Times New Roman Bold Italic.ttf
- * Times New Roman Bold.ttf
- * Times New Roman Italic.ttf
- * Times New Roman.ttf
-
-
-System fonts
-------------
-
-If neither '\-\-portableFonts' nor '\-\-resourceFonts' is specified, dm uses the fonts
-present on the system. Also, if '\-\-portableFonts' or '\-\-resourceFonts' is specified
-and the desired font is not available, the native font lookup algorithm is
-invoked.
-
-
GM font selection
-----------------
@@ -84,35 +32,3 @@ SkFontStyle style);
Eventually, both 'set_portable_typeface()' and 'create_portable_typeface()' will be
removed. Instead, a test-wide 'SkFontMgr' will be selected to choose portable
fonts or resource fonts.
-
-
-Adding new fonts and glyphs to a GM
------------------------------------
-
-If a font is missing from the portable data or the resource directory, the
-system font is used instead. If a glyph is missing from the portable data, the
-first character, usually a space, is drawn instead.
-
-Running dm with '\-\-portableFonts' and '\-\-reportUsedChars' generates
-'tools/test_font_data_chars.cpp', which describes the fonts and characters used by
-all gm tests. Subsequently running the 'create_test_font' tool generates new paths
-and writes them into 'tools/test_font_data.cpp' .
-
-
-Future work
------------
-
-The font set used by gm tests today is arbitrary and not intended to be
-cross-platform. By choosing fonts without licensing issues, all bots can freely
-contain the same fonts. By narrowing the font selection, the size of the test
-font data will be more manageable.
-
-Adding support for selecting from multiple font managers at runtime permits
-removing manual typeface selection in the gm tests. Today, options to dm like
-'\-\-pipe' fail with '\-\-portableFonts' because we're hard-coded to using the default
-font manage when pictures are serialized.
-
-Some gm tests explicitly always want to use system fonts and system metrics;
-other gm tests use text only to label the drawing; yet other gm tests use text
-to generate paths for testing. Additional discrimination is needed to
-distinguish these cases.
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp
index f1968742d4..0a93db4239 100644
--- a/tools/sk_tool_utils.cpp
+++ b/tools/sk_tool_utils.cpp
@@ -6,7 +6,6 @@
*/
#include "sk_tool_utils.h"
-#include "sk_tool_utils_flags.h"
#include "Resources.h"
#include "SkBitmap.h"
@@ -21,8 +20,6 @@
#include "SkTestScalerContext.h"
#include "SkTextBlob.h"
-DEFINE_bool(portableFonts, false, "Use portable fonts");
-
namespace sk_tool_utils {
/* these are the default fonts chosen by Chrome for serif, sans-serif, and monospace */
diff --git a/tools/sk_tool_utils_flags.h b/tools/sk_tool_utils_flags.h
deleted file mode 100644
index ee15fbdee1..0000000000
--- a/tools/sk_tool_utils_flags.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef sk_tool_utils_flags_DEFINED
-#define sk_tool_utils_flags_DEFINED
-
-#include "SkCommandLineFlags.h"
-
-DECLARE_bool(portableFonts);
-DECLARE_bool(resourceFonts);
-
-#endif // sk_tool_utils_flags_DEFINED