| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2015 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 // Auto-generated by create_test_font.cpp | |
| 9 | |
| 10 static SkTestFontData gTestFonts[] = { | |
| 11 { LiberationMonoNormalPoints, LiberationMonoNormalVerbs, LiberationMonoNo
rmalCharCodes, | |
| 12 LiberationMonoNormalCharCodesCount, LiberationMonoNormalWidths, | |
| 13 LiberationMonoNormalMetrics, "Toy Liberation Mono", SkTypeface::kNormal
, nullptr | |
| 14 }, | |
| 15 { LiberationMonoBoldPoints, LiberationMonoBoldVerbs, LiberationMonoBoldCh
arCodes, | |
| 16 LiberationMonoBoldCharCodesCount, LiberationMonoBoldWidths, | |
| 17 LiberationMonoBoldMetrics, "Toy Liberation Mono", SkTypeface::kBold, nu
llptr | |
| 18 }, | |
| 19 { LiberationMonoItalicPoints, LiberationMonoItalicVerbs, LiberationMonoIt
alicCharCodes, | |
| 20 LiberationMonoItalicCharCodesCount, LiberationMonoItalicWidths, | |
| 21 LiberationMonoItalicMetrics, "Toy Liberation Mono", SkTypeface::kItalic
, nullptr | |
| 22 }, | |
| 23 { LiberationMonoBoldItalicPoints, LiberationMonoBoldItalicVerbs, Liberati
onMonoBoldItalicCharCodes, | |
| 24 LiberationMonoBoldItalicCharCodesCount, LiberationMonoBoldItalicWidths, | |
| 25 LiberationMonoBoldItalicMetrics, "Toy Liberation Mono", SkTypeface::kBo
ldItalic, nullptr | |
| 26 }, | |
| 27 { LiberationSansNormalPoints, LiberationSansNormalVerbs, LiberationSansNo
rmalCharCodes, | |
| 28 LiberationSansNormalCharCodesCount, LiberationSansNormalWidths, | |
| 29 LiberationSansNormalMetrics, "Toy Liberation Sans", SkTypeface::kNormal
, nullptr | |
| 30 }, | |
| 31 { LiberationSansBoldPoints, LiberationSansBoldVerbs, LiberationSansBoldCh
arCodes, | |
| 32 LiberationSansBoldCharCodesCount, LiberationSansBoldWidths, | |
| 33 LiberationSansBoldMetrics, "Toy Liberation Sans", SkTypeface::kBold, nu
llptr | |
| 34 }, | |
| 35 { LiberationSansItalicPoints, LiberationSansItalicVerbs, LiberationSansIt
alicCharCodes, | |
| 36 LiberationSansItalicCharCodesCount, LiberationSansItalicWidths, | |
| 37 LiberationSansItalicMetrics, "Toy Liberation Sans", SkTypeface::kItalic
, nullptr | |
| 38 }, | |
| 39 { LiberationSansBoldItalicPoints, LiberationSansBoldItalicVerbs, Liberati
onSansBoldItalicCharCodes, | |
| 40 LiberationSansBoldItalicCharCodesCount, LiberationSansBoldItalicWidths, | |
| 41 LiberationSansBoldItalicMetrics, "Toy Liberation Sans", SkTypeface::kBo
ldItalic, nullptr | |
| 42 }, | |
| 43 { LiberationSerifNormalPoints, LiberationSerifNormalVerbs, LiberationSeri
fNormalCharCodes, | |
| 44 LiberationSerifNormalCharCodesCount, LiberationSerifNormalWidths, | |
| 45 LiberationSerifNormalMetrics, "Toy Liberation Serif", SkTypeface::kNorm
al, nullptr | |
| 46 }, | |
| 47 { LiberationSerifBoldPoints, LiberationSerifBoldVerbs, LiberationSerifBol
dCharCodes, | |
| 48 LiberationSerifBoldCharCodesCount, LiberationSerifBoldWidths, | |
| 49 LiberationSerifBoldMetrics, "Toy Liberation Serif", SkTypeface::kBold,
nullptr | |
| 50 }, | |
| 51 { LiberationSerifItalicPoints, LiberationSerifItalicVerbs, LiberationSeri
fItalicCharCodes, | |
| 52 LiberationSerifItalicCharCodesCount, LiberationSerifItalicWidths, | |
| 53 LiberationSerifItalicMetrics, "Toy Liberation Serif", SkTypeface::kItal
ic, nullptr | |
| 54 }, | |
| 55 { LiberationSerifBoldItalicPoints, LiberationSerifBoldItalicVerbs, Libera
tionSerifBoldItalicCharCodes, | |
| 56 LiberationSerifBoldItalicCharCodesCount, LiberationSerifBoldItalicWidth
s, | |
| 57 LiberationSerifBoldItalicMetrics, "Toy Liberation Serif", SkTypeface::k
BoldItalic, nullptr | |
| 58 }, | |
| 59 }; | |
| 60 | |
| 61 const int gTestFontsCount = (int) SK_ARRAY_COUNT(gTestFonts); | |
| 62 | |
| 63 struct SubFont { | |
| 64 const char* fName; | |
| 65 SkFontStyle fStyle; | |
| 66 SkTestFontData& fFont; | |
| 67 const char* fFile; | |
| 68 }; | |
| 69 | |
| 70 const SubFont gSubFonts[] = { | |
| 71 { "monospace", SkFontStyle(), gTestFonts[0], "LiberationMono-Regular.ttf" }, | |
| 72 { "monospace", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[1],
"LiberationMono-Bold.ttf" }, | |
| 73 { "monospace", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[2]
, "LiberationMono-Italic.ttf" }, | |
| 74 { "monospace", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFont
s[3], "LiberationMono-BoldItalic.ttf" }, | |
| 75 { "sans-serif", SkFontStyle(), gTestFonts[4], "LiberationSans-Regular.ttf" }
, | |
| 76 { "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[5],
"LiberationSans-Bold.ttf" }, | |
| 77 { "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[6
], "LiberationSans-Italic.ttf" }, | |
| 78 { "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFon
ts[7], "LiberationSans-BoldItalic.ttf" }, | |
| 79 { "serif", SkFontStyle(), gTestFonts[8], "LiberationSerif-Regular.ttf" }, | |
| 80 { "serif", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[9], "Lib
erationSerif-Bold.ttf" }, | |
| 81 { "serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[10], "
LiberationSerif-Italic.ttf" }, | |
| 82 { "serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[11
], "LiberationSerif-BoldItalic.ttf" }, | |
| 83 { "Toy Liberation Mono", SkFontStyle(), gTestFonts[0], "LiberationMono-Regul
ar.ttf" }, | |
| 84 { "Toy Liberation Mono", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTest
Fonts[1], "LiberationMono-Bold.ttf" }, | |
| 85 { "Toy Liberation Mono", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTe
stFonts[2], "LiberationMono-Italic.ttf" }, | |
| 86 { "Toy Liberation Mono", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic),
gTestFonts[3], "LiberationMono-BoldItalic.ttf" }, | |
| 87 { "Toy Liberation Sans", SkFontStyle(), gTestFonts[4], "LiberationSans-Regul
ar.ttf" }, | |
| 88 { "Toy Liberation Sans", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTest
Fonts[5], "LiberationSans-Bold.ttf" }, | |
| 89 { "Toy Liberation Sans", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTe
stFonts[6], "LiberationSans-Italic.ttf" }, | |
| 90 { "Toy Liberation Sans", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic),
gTestFonts[7], "LiberationSans-BoldItalic.ttf" }, | |
| 91 { "Toy Liberation Serif", SkFontStyle(), gTestFonts[8], "LiberationSerif-Reg
ular.ttf" }, | |
| 92 { "Toy Liberation Serif", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTes
tFonts[9], "LiberationSerif-Bold.ttf" }, | |
| 93 { "Toy Liberation Serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gT
estFonts[10], "LiberationSerif-Italic.ttf" }, | |
| 94 { "Toy Liberation Serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic)
, gTestFonts[11], "LiberationSerif-BoldItalic.ttf" }, | |
| 95 }; | |
| 96 | |
| 97 const int gSubFontsCount = (int) SK_ARRAY_COUNT(gSubFonts); | |
| 98 | |
| 99 const int gDefaultFontIndex = 4; | |
| OLD | NEW |