skia2/tools/test_font_data_chars.cpp
Cary Clark 992c7b03ef Add standard fonts to all GMs.
Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

  sk_tool_utils::set_portable_typeface or
  sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
2014-07-31 08:58:44 -04:00

38 lines
1.4 KiB
C++

/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Auto-generated by sk_tool_utils_font.cpp
const char gCourierNew[] =
" !/<>ACHMTWYabcdefgilmnoprstuy";
const char gCourierNew_Bold[] =
" AHTWYabefgmnoprsuy";
const char gCourierNew_Italic[] =
" AHTWYabefgmnoprsuy";
const char gCourierNew_BoldItalic[] =
" AHTWYabefgmnoprsuy";
const char gLiberationSans[] =
" !#%&')*+-./1245679:;<=>?@ABCDEFHIJKLMNOPQRSTVWXYZ[\\]^`abcdefgilmnopqrstuvwxyz";
const char gLiberationSans_Bold[] =
" !\"#$%&'()*+-./012356789:;=>?ABCDEFGHIJLMORSTUVWXYZ[]^_abdefghijklmnopqrsuvwxyz";
const char gLiberationSans_Italic[] =
" AHTWYabefgmnoprsuy";
const char gLiberationSans_BoldItalic[] =
" !,-./012345689:ABCDEFGHIKLMNOPQRSTUWXYZ[\\]_abcdefghijklmnopqrstuvwxyz";
const char gHiraginoMaruGothicPro[] =
" !Tacefnprsuy" "\xE3" "\x83" "\xBC";
const char gPapyrus[] =
" !HTaceflnoprsuy";
const char gTimesNewRoman[] =
" !\"#$%&'()*+,-./123456789;<=>?@ABCDEFGHIJKLMNPQRSTVWXYZ[\\]^_`abcdefgijklmnopqrstuvwxyz";
const char gTimesNewRoman_Bold[] =
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz";
const char gTimesNewRoman_Italic[] =
" AHTWYabefgmnoprsuy";
const char gTimesNewRoman_BoldItalic[] =
" AHTWYabefgmnoprsuy";