Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Unified Diff: tools/test_font_index.cpp

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Android fix + nit fix Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/sk_tool_utils_font.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test_font_index.cpp
diff --git a/tools/test_font_index.cpp b/tools/test_font_index.cpp
index b9bc24c63f55ca7fd5af3b92773853f9c8ed10e1..b52c004ccb8a5407038e98c5e90654ce94ba43f1 100644
--- a/tools/test_font_index.cpp
+++ b/tools/test_font_index.cpp
@@ -62,36 +62,36 @@ const int gTestFontsCount = (int) SK_ARRAY_COUNT(gTestFonts);
struct SubFont {
const char* fName;
- SkTypeface::Style fStyle;
+ SkFontStyle fStyle;
SkTestFontData& fFont;
const char* fFile;
};
const SubFont gSubFonts[] = {
- { "monospace", SkTypeface::kNormal, gTestFonts[0], "LiberationMono-Regular.ttf" },
- { "monospace", SkTypeface::kBold, gTestFonts[1], "LiberationMono-Bold.ttf" },
- { "monospace", SkTypeface::kItalic, gTestFonts[2], "LiberationMono-Italic.ttf" },
- { "monospace", SkTypeface::kBoldItalic, gTestFonts[3], "LiberationMono-BoldItalic.ttf" },
- { "sans-serif", SkTypeface::kNormal, gTestFonts[4], "LiberationSans-Regular.ttf" },
- { "sans-serif", SkTypeface::kBold, gTestFonts[5], "LiberationSans-Bold.ttf" },
- { "sans-serif", SkTypeface::kItalic, gTestFonts[6], "LiberationSans-Italic.ttf" },
- { "sans-serif", SkTypeface::kBoldItalic, gTestFonts[7], "LiberationSans-BoldItalic.ttf" },
- { "serif", SkTypeface::kNormal, gTestFonts[8], "LiberationSerif-Regular.ttf" },
- { "serif", SkTypeface::kBold, gTestFonts[9], "LiberationSerif-Bold.ttf" },
- { "serif", SkTypeface::kItalic, gTestFonts[10], "LiberationSerif-Italic.ttf" },
- { "serif", SkTypeface::kBoldItalic, gTestFonts[11], "LiberationSerif-BoldItalic.ttf" },
- { "Toy Liberation Mono", SkTypeface::kNormal, gTestFonts[0], "LiberationMono-Regular.ttf" },
- { "Toy Liberation Mono", SkTypeface::kBold, gTestFonts[1], "LiberationMono-Bold.ttf" },
- { "Toy Liberation Mono", SkTypeface::kItalic, gTestFonts[2], "LiberationMono-Italic.ttf" },
- { "Toy Liberation Mono", SkTypeface::kBoldItalic, gTestFonts[3], "LiberationMono-BoldItalic.ttf" },
- { "Toy Liberation Sans", SkTypeface::kNormal, gTestFonts[4], "LiberationSans-Regular.ttf" },
- { "Toy Liberation Sans", SkTypeface::kBold, gTestFonts[5], "LiberationSans-Bold.ttf" },
- { "Toy Liberation Sans", SkTypeface::kItalic, gTestFonts[6], "LiberationSans-Italic.ttf" },
- { "Toy Liberation Sans", SkTypeface::kBoldItalic, gTestFonts[7], "LiberationSans-BoldItalic.ttf" },
- { "Toy Liberation Serif", SkTypeface::kNormal, gTestFonts[8], "LiberationSerif-Regular.ttf" },
- { "Toy Liberation Serif", SkTypeface::kBold, gTestFonts[9], "LiberationSerif-Bold.ttf" },
- { "Toy Liberation Serif", SkTypeface::kItalic, gTestFonts[10], "LiberationSerif-Italic.ttf" },
- { "Toy Liberation Serif", SkTypeface::kBoldItalic, gTestFonts[11], "LiberationSerif-BoldItalic.ttf" },
+ { "monospace", SkFontStyle(), gTestFonts[0], "LiberationMono-Regular.ttf" },
+ { "monospace", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[1], "LiberationMono-Bold.ttf" },
+ { "monospace", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[2], "LiberationMono-Italic.ttf" },
+ { "monospace", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[3], "LiberationMono-BoldItalic.ttf" },
+ { "sans-serif", SkFontStyle(), gTestFonts[4], "LiberationSans-Regular.ttf" },
+ { "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[5], "LiberationSans-Bold.ttf" },
+ { "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[6], "LiberationSans-Italic.ttf" },
+ { "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[7], "LiberationSans-BoldItalic.ttf" },
+ { "serif", SkFontStyle(), gTestFonts[8], "LiberationSerif-Regular.ttf" },
+ { "serif", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[9], "LiberationSerif-Bold.ttf" },
+ { "serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[10], "LiberationSerif-Italic.ttf" },
+ { "serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[11], "LiberationSerif-BoldItalic.ttf" },
+ { "Toy Liberation Mono", SkFontStyle(), gTestFonts[0], "LiberationMono-Regular.ttf" },
+ { "Toy Liberation Mono", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[1], "LiberationMono-Bold.ttf" },
+ { "Toy Liberation Mono", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[2], "LiberationMono-Italic.ttf" },
+ { "Toy Liberation Mono", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[3], "LiberationMono-BoldItalic.ttf" },
+ { "Toy Liberation Sans", SkFontStyle(), gTestFonts[4], "LiberationSans-Regular.ttf" },
+ { "Toy Liberation Sans", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[5], "LiberationSans-Bold.ttf" },
+ { "Toy Liberation Sans", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[6], "LiberationSans-Italic.ttf" },
+ { "Toy Liberation Sans", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[7], "LiberationSans-BoldItalic.ttf" },
+ { "Toy Liberation Serif", SkFontStyle(), gTestFonts[8], "LiberationSerif-Regular.ttf" },
+ { "Toy Liberation Serif", SkFontStyle::FromOldStyle(SkTypeface::kBold), gTestFonts[9], "LiberationSerif-Bold.ttf" },
+ { "Toy Liberation Serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic), gTestFonts[10], "LiberationSerif-Italic.ttf" },
+ { "Toy Liberation Serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic), gTestFonts[11], "LiberationSerif-BoldItalic.ttf" },
};
const int gSubFontsCount = (int) SK_ARRAY_COUNT(gSubFonts);
« no previous file with comments | « tools/sk_tool_utils_font.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698