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>
This commit is contained in:
parent
7a13d871ca
commit
97f0bc6a1a
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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 */
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user