SkTypeface::MakeFromName to take SkFontStyle.

SkTypeface::MakeFromName currently takes SkTypeface::Style,
which is quite limited. This starts the transition to this
function taking SkFontStyle instead.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002

TBR=reed
He said it sounded like a good idea.

Review-Url: https://codereview.chromium.org/1818043002
diff --git a/bench/SkGlyphCacheBench.cpp b/bench/SkGlyphCacheBench.cpp
index c5e40af..4d43a61 100644
--- a/bench/SkGlyphCacheBench.cpp
+++ b/bench/SkGlyphCacheBench.cpp
@@ -56,7 +56,8 @@
         SkPaint paint;
         paint.setAntiAlias(true);
         paint.setSubpixelText(true);
-        paint.setTypeface(sk_tool_utils::create_portable_typeface("serif", SkTypeface::kItalic));
+        paint.setTypeface(sk_tool_utils::create_portable_typeface(
+                              "serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic)));
 
         for (int work = 0; work < loops; work++) {
             do_font_stuff(&paint);
@@ -88,8 +89,10 @@
         size_t oldCacheLimitSize = SkGraphics::GetFontCacheLimit();
         SkGraphics::SetFontCacheLimit(fCacheSize);
         sk_sp<SkTypeface> typefaces[] =
-            {sk_tool_utils::create_portable_typeface("serif", SkTypeface::kItalic),
-             sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kItalic)};
+            {sk_tool_utils::create_portable_typeface("serif",
+                  SkFontStyle::FromOldStyle(SkTypeface::kItalic)),
+             sk_tool_utils::create_portable_typeface("sans-serif",
+                  SkFontStyle::FromOldStyle(SkTypeface::kItalic))};
 
         for (int work = 0; work < loops; work++) {
             SkTaskGroup().batch(16, [&](int threadIndex) {
diff --git a/bench/TextBlobBench.cpp b/bench/TextBlobBench.cpp
index 37bf311..7c9b303 100644
--- a/bench/TextBlobBench.cpp
+++ b/bench/TextBlobBench.cpp
@@ -27,7 +27,7 @@
 
 protected:
     void onDelayedSetup() override {
-        fTypeface = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal);
+        fTypeface = sk_tool_utils::create_portable_typeface("serif", SkFontStyle());
         // make textblob
         SkPaint paint;
         paint.setTypeface(fTypeface);
diff --git a/dm/DM.cpp b/dm/DM.cpp
index b10de5e..8ee2ea7 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1219,7 +1219,7 @@
 
 #define PORTABLE_FONT_PREFIX "Toy Liberation "
 
-static sk_sp<SkTypeface> create_from_name(const char familyName[], SkTypeface::Style style) {
+static sk_sp<SkTypeface> create_from_name(const char familyName[], SkFontStyle style) {
     if (familyName && strlen(familyName) > sizeof(PORTABLE_FONT_PREFIX)
             && !strncmp(familyName, PORTABLE_FONT_PREFIX, sizeof(PORTABLE_FONT_PREFIX) - 1)) {
         return sk_tool_utils::create_portable_typeface(familyName, style);
@@ -1229,7 +1229,7 @@
 
 #undef PORTABLE_FONT_PREFIX
 
-extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style );
+extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle );
 
 extern bool gDefaultProfileIsSRGB;
 
diff --git a/fuzz/FilterFuzz.cpp b/fuzz/FilterFuzz.cpp
index bbc403c..cf92eae 100644
--- a/fuzz/FilterFuzz.cpp
+++ b/fuzz/FilterFuzz.cpp
@@ -195,8 +195,8 @@
     return static_cast<SkFilterQuality>(R(kHigh_SkFilterQuality+1));
 }
 
-static SkTypeface::Style make_typeface_style() {
-    return static_cast<SkTypeface::Style>(R(SkTypeface::kBoldItalic+1));
+static SkFontStyle make_typeface_style() {
+    return SkFontStyle::FromOldStyle(R(SkTypeface::kBoldItalic+1));
 }
 
 static SkPath1DPathEffect::Style make_path_1d_path_effect_style() {
diff --git a/gm/all_bitmap_configs.cpp b/gm/all_bitmap_configs.cpp
index c533b6f..bc296fc 100644
--- a/gm/all_bitmap_configs.cpp
+++ b/gm/all_bitmap_configs.cpp
@@ -75,7 +75,7 @@
     const SkScalar D = 0.3f * SkIntToScalar(SCALE);
     const SkScalar X = SkDoubleToScalar(D * sqrt_3_over_2);
     const SkScalar Y = D * SK_ScalarHalf;
-    sk_tool_utils::set_portable_typeface(&p, nullptr, SkTypeface::kBold);
+    sk_tool_utils::set_portable_typeface(&p, nullptr, SkFontStyle::FromOldStyle(SkTypeface::kBold));
     p.setTextSize(0.28125f * SCALE);
     draw_center_letter('K', &p, SK_ColorBLACK, Z, Z, canvas);
     draw_center_letter('R', &p, SK_ColorRED, Z, D, canvas);
diff --git a/gm/colortype.cpp b/gm/colortype.cpp
index 68dfeee..516bb75 100644
--- a/gm/colortype.cpp
+++ b/gm/colortype.cpp
@@ -27,7 +27,8 @@
         paint.setShader(SkGradientShader::MakeSweep(0, 0, colors, nullptr, SK_ARRAY_COUNT(colors),
                                                     0, &local));
 
-        sk_sp<SkTypeface> orig(sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold));
+        sk_sp<SkTypeface> orig(sk_tool_utils::create_portable_typeface(
+                                   "serif", SkFontStyle::FromOldStyle(SkTypeface::kBold)));
         if (nullptr == orig) {
             orig = SkTypeface::MakeDefault();
         }
diff --git a/gm/colortypexfermode.cpp b/gm/colortypexfermode.cpp
index 058b92d..554282f 100644
--- a/gm/colortypexfermode.cpp
+++ b/gm/colortypexfermode.cpp
@@ -34,7 +34,8 @@
         paint.setShader(SkGradientShader::MakeSweep(0, 0, colors, nullptr, SK_ARRAY_COUNT(colors),
                                                     0, &local));
 
-        sk_sp<SkTypeface> orig(sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold));
+        sk_sp<SkTypeface> orig(sk_tool_utils::create_portable_typeface("serif",
+                                   SkFontStyle::FromOldStyle(SkTypeface::kBold)));
         if (nullptr == orig) {
             orig = SkTypeface::MakeDefault();
         }
diff --git a/gm/colorwheel.cpp b/gm/colorwheel.cpp
index 2ebf330..a1ca021 100644
--- a/gm/colorwheel.cpp
+++ b/gm/colorwheel.cpp
@@ -40,7 +40,8 @@
 
 DEF_SIMPLE_GM(colorwheelnative, canvas, 128, 28) {
     SkPaint paint;
-    sk_tool_utils::set_portable_typeface(&paint, "sans-serif", SkTypeface::kBold);
+    sk_tool_utils::set_portable_typeface(&paint, "sans-serif",
+                                         SkFontStyle::FromOldStyle(SkTypeface::kBold));
     paint.setTextSize(18.0f);
 
     canvas->clear(sk_tool_utils::color_to_565(SK_ColorLTGRAY));
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index c7d9a8b..05aef4c 100644
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -70,7 +70,7 @@
         paint.setAntiAlias(true);
         paint.setSubpixelText(true);
 
-        sk_tool_utils::set_portable_typeface(&paint, "serif", SkTypeface::kNormal);
+        sk_tool_utils::set_portable_typeface(&paint, "serif");
 
         const char* text = "Hamburgefons";
         const size_t textLen = strlen(text);
diff --git a/gm/downsamplebitmap.cpp b/gm/downsamplebitmap.cpp
index 5983824..ce3eb69 100644
--- a/gm/downsamplebitmap.cpp
+++ b/gm/downsamplebitmap.cpp
@@ -29,7 +29,7 @@
     }
 }
 
-static void setTypeface(SkPaint* paint, const char name[], SkTypeface::Style style) {
+static void setTypeface(SkPaint* paint, const char name[], SkFontStyle style) {
     sk_tool_utils::set_portable_typeface(paint, name, style);
 }
 
@@ -125,13 +125,13 @@
           paint.setSubpixelText(true);
           paint.setTextSize(fTextSize);
 
-          setTypeface(&paint, "serif", SkTypeface::kNormal);
+          setTypeface(&paint, "serif", SkFontStyle());
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 1.2f*fTextSize, paint);
-          setTypeface(&paint, "serif", SkTypeface::kBold);
+          setTypeface(&paint, "serif", SkFontStyle::FromOldStyle(SkTypeface::kBold));
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 2.4f*fTextSize, paint);
-          setTypeface(&paint, "serif", SkTypeface::kItalic);
+          setTypeface(&paint, "serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic));
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 3.6f*fTextSize, paint);
-          setTypeface(&paint, "serif", SkTypeface::kBoldItalic);
+          setTypeface(&paint, "serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic));
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 4.8f*fTextSize, paint);
       }
   private:
diff --git a/gm/filterbitmap.cpp b/gm/filterbitmap.cpp
index 51a8064..ec20e6e 100644
--- a/gm/filterbitmap.cpp
+++ b/gm/filterbitmap.cpp
@@ -12,7 +12,7 @@
 #include "SkStream.h"
 #include "SkTypeface.h"
 
-static void setTypeface(SkPaint* paint, const char name[], SkTypeface::Style style) {
+static void setTypeface(SkPaint* paint, const char name[], SkFontStyle style) {
     sk_tool_utils::set_portable_typeface(paint, name, style);
 }
 
@@ -123,13 +123,13 @@
           paint.setSubpixelText(true);
           paint.setTextSize(fTextSize);
 
-          setTypeface(&paint, "serif", SkTypeface::kNormal);
+          setTypeface(&paint, "serif", SkFontStyle());
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 1.2f*fTextSize, paint);
-          setTypeface(&paint, "serif", SkTypeface::kBold);
+          setTypeface(&paint, "serif", SkFontStyle::FromOldStyle(SkTypeface::kBold));
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 2.4f*fTextSize, paint);
-          setTypeface(&paint, "serif", SkTypeface::kItalic);
+          setTypeface(&paint, "serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic));
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 3.6f*fTextSize, paint);
-          setTypeface(&paint, "serif", SkTypeface::kBoldItalic);
+          setTypeface(&paint, "serif", SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic));
           canvas.drawText("Hamburgefons", 12, fTextSize/2, 4.8f*fTextSize, paint);
       }
   private:
diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp
index c4af489..22b29f4 100644
--- a/gm/fontcache.cpp
+++ b/gm/fontcache.cpp
@@ -32,8 +32,10 @@
     }
 
     void onOnceBeforeDraw() override {
-        fTypefaces[0] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kItalic);
-        fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kItalic);
+        fTypefaces[0] = sk_tool_utils::create_portable_typeface("serif",
+            SkFontStyle::FromOldStyle(SkTypeface::kItalic));
+        fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif",
+            SkFontStyle::FromOldStyle(SkTypeface::kItalic));
     }
 
     void onDraw(SkCanvas* canvas) override {
diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp
index c7d4309f..8fa5171 100644
--- a/gm/gammatext.cpp
+++ b/gm/gammatext.cpp
@@ -19,7 +19,7 @@
 }
 
 static bool setFont(SkPaint* paint, const char name[]) {
-    paint->setTypeface(SkTypeface::MakeFromName(name, SkTypeface::kNormal));
+    paint->setTypeface(SkTypeface::MakeFromName(name, SkFontStyle()));
     return SkToBool(paint->getTypeface());
 }
 
@@ -104,7 +104,8 @@
 }
 
 static void set_face(SkPaint* paint) {
-    paint->setTypeface(SkTypeface::MakeFromName("serif", SkTypeface::kItalic));
+    paint->setTypeface(SkTypeface::MakeFromName("serif",
+                           SkFontStyle::FromOldStyle(SkTypeface::kItalic)));
 }
 
 static void draw_pair(SkCanvas* canvas, SkPaint* paint, const sk_sp<SkShader>& shader) {
diff --git a/gm/textblob.cpp b/gm/textblob.cpp
index 525cfd2..2ac7d27 100644
--- a/gm/textblob.cpp
+++ b/gm/textblob.cpp
@@ -72,7 +72,7 @@
 
 protected:
     void onOnceBeforeDraw() override {
-        fTypeface = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal);
+        fTypeface = sk_tool_utils::create_portable_typeface("serif", SkFontStyle());
         SkPaint p;
         p.setTypeface(fTypeface);
         size_t txtLen = strlen(fText);
diff --git a/gm/textblobrandomfont.cpp b/gm/textblobrandomfont.cpp
index 51dbfce..2a6fc8e 100644
--- a/gm/textblobrandomfont.cpp
+++ b/gm/textblobrandomfont.cpp
@@ -39,8 +39,8 @@
         paint.setLCDRenderText(true);
 
         // Setup our random scaler context
-        sk_sp<SkTypeface> orig(sk_tool_utils::create_portable_typeface("sans-serif",
-                                                                       SkTypeface::kBold));
+        sk_sp<SkTypeface> orig(sk_tool_utils::create_portable_typeface(
+                                   "sans-serif", SkFontStyle::FromOldStyle(SkTypeface::kBold)));
         if (nullptr == orig) {
             orig = SkTypeface::MakeDefault();
         }
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp
index a398ae2..e199594 100644
--- a/gm/texteffects.cpp
+++ b/gm/texteffects.cpp
@@ -268,7 +268,7 @@
     const char test[] = "aAjJgGyY_|{-(~[,]qQ}pP}zZ";
     SkPoint textPt = { 10, 80 };
     for (int font = 0; font < 3; ++font) {
-        sk_tool_utils::set_portable_typeface(&paint, fam[font], SkTypeface::kNormal);
+        sk_tool_utils::set_portable_typeface(&paint, fam[font]);
         for (SkScalar textSize = 100; textSize > 10; textSize -= 20) {
             paint.setTextSize(textSize);
             const SkScalar uWidth = textSize / 15;
@@ -312,7 +312,7 @@
     const char test[] = "aAjJgGyY_|{-(~[,]qQ}pP}zZ";
     SkPoint textPt = { 10, 80 };
     for (int font = 0; font < 3; ++font) {
-        sk_tool_utils::set_portable_typeface(&paint, fam[font], SkTypeface::kNormal);
+        sk_tool_utils::set_portable_typeface(&paint, fam[font]);
         for (SkScalar textSize = 100; textSize > 10; textSize -= 20) {
             paint.setTextSize(textSize);
             const SkScalar uWidth = textSize / 15;
diff --git a/gm/typeface.cpp b/gm/typeface.cpp
index e77d277..e4e0d24 100644
--- a/gm/typeface.cpp
+++ b/gm/typeface.cpp
@@ -103,7 +103,8 @@
     void onOnceBeforeDraw() override {
         for (int i = 0; i < gFaceStylesCount; i++) {
             fFaces[i] = SkTypeface::MakeFromName(
-                    sk_tool_utils::platform_font_name(gFaceStyles[i].fName), gFaceStyles[i].fStyle);
+                    sk_tool_utils::platform_font_name(
+                        gFaceStyles[i].fName), SkFontStyle::FromOldStyle(gFaceStyles[i].fStyle));
         }
     }
 
diff --git a/gm/variedtext.cpp b/gm/variedtext.cpp
index e295cbc..e33c40b 100644
--- a/gm/variedtext.cpp
+++ b/gm/variedtext.cpp
@@ -52,10 +52,12 @@
         SkScalar h = SkIntToScalar(size.fHeight);
 
         static_assert(4 == SK_ARRAY_COUNT(fTypefaces), "typeface_cnt");
-        fTypefaces[0] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kNormal);
-        fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kBold);
-        fTypefaces[2] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal);
-        fTypefaces[3] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold);
+        fTypefaces[0] = sk_tool_utils::create_portable_typeface("sans-serif", SkFontStyle());
+        fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif",
+                            SkFontStyle::FromOldStyle(SkTypeface::kBold));
+        fTypefaces[2] = sk_tool_utils::create_portable_typeface("serif", SkFontStyle());
+        fTypefaces[3] = sk_tool_utils::create_portable_typeface("serif",
+                            SkFontStyle::FromOldStyle(SkTypeface::kBold));
 
         SkRandom random;
         for (int i = 0; i < kCnt; ++i) {
diff --git a/gm/verttext2.cpp b/gm/verttext2.cpp
index 79cbdbc..9afedc6 100644
--- a/gm/verttext2.cpp
+++ b/gm/verttext2.cpp
@@ -24,9 +24,9 @@
         const int pointSize = 24;
         textHeight = SkIntToScalar(pointSize);
         fProp = SkTypeface::MakeFromName(sk_tool_utils::platform_font_name("sans-serif"),
-                SkTypeface::kNormal);
+                SkFontStyle());
         fMono = SkTypeface::MakeFromName(sk_tool_utils::platform_font_name("monospace"),
-                SkTypeface::kNormal);
+                SkFontStyle());
     }
 
     SkString onShortName() override {
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 3a47bd2..f67ba37 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -100,6 +100,19 @@
     }
 #endif
 
+  /** Creates a new reference to the typeface that most closely matches the
+      requested familyName and fontStyle. This method allows extended font
+      face specifiers as in the SkFontStyle type. Will never return null.
+
+      @param familyName  May be NULL. The name of the font family.
+      @param fontStyle   The style of the typeface.
+      @return reference to the closest-matching typeface. Call must call
+              unref() when they are done.
+    */
+  static sk_sp<SkTypeface> MakeFromName(const char familyName[],
+                                        SkFontStyle fontStyle);
+
+#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME
     /** Return the typeface that most closely matches the requested familyName and style.
         Pass nullptr as the familyName to request the default font for the requested style.
         Will never return nullptr.
@@ -109,9 +122,10 @@
         @return the closest-matching typeface.
     */
     static sk_sp<SkTypeface> MakeFromName(const char familyName[], Style style);
+#endif
 #ifdef SK_SUPPORT_LEGACY_TYPEFACE_PTR
     static SkTypeface* CreateFromName(const char familyName[], Style style) {
-        return MakeFromName(familyName, style).release();
+        return MakeFromName(familyName, SkFontStyle::FromOldStyle(style)).release();
     }
 #endif
 
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index 7c6158a..ef0fec7 100644
--- a/samplecode/ClockFaceView.cpp
+++ b/samplecode/ClockFaceView.cpp
@@ -221,7 +221,8 @@
 
         paint.setAntiAlias(true);
         paint.setTextSize(SkIntToScalar(240));
-        paint.setTypeface(SkTypeface::MakeFromName("sans-serif", SkTypeface::kBold));
+        paint.setTypeface(SkTypeface::MakeFromName("sans-serif",
+                                                   SkFontStyle::FromOldStyle(SkTypeface::kBold)));
 
         SkString str("9");
 
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 738b34e..29b5c66 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -527,7 +527,8 @@
 
         paint.setAntiAlias(true);
         paint.setTextSize(SkIntToScalar(48));
-        paint.setTypeface(SkTypeface::MakeFromName("sans-serif", SkTypeface::kBold));
+        paint.setTypeface(SkTypeface::MakeFromName("sans-serif",
+                                                   SkFontStyle::FromOldStyle(SkTypeface::kBold)));
 
         SkString str("GOOGLE");
 
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 8837241..78bc673 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -198,8 +198,8 @@
     return static_cast<SkFilterQuality>(R(kHigh_SkFilterQuality+1));
 }
 
-static SkTypeface::Style make_typeface_style() {
-    return static_cast<SkTypeface::Style>(R(SkTypeface::kBoldItalic+1));
+static SkFontStyle make_typeface_style() {
+    return SkFontStyle::FromOldStyle(SkTypeface::kBoldItalic+1);
 }
 
 static SkPath1DPathEffect::Style make_path_1d_path_effect_style() {
diff --git a/samplecode/SampleFontScalerTest.cpp b/samplecode/SampleFontScalerTest.cpp
index 72371ed..bd93097 100644
--- a/samplecode/SampleFontScalerTest.cpp
+++ b/samplecode/SampleFontScalerTest.cpp
@@ -41,7 +41,8 @@
 public:
     FontScalerTestView() {
         for (int i = 0; i < gFaceCount; i++) {
-            fFaces[i] = SkTypeface::MakeFromName(gFaces[i].fName, gFaces[i].fStyle);
+            fFaces[i] = SkTypeface::MakeFromName(
+                gFaces[i].fName, SkFontStyle::FromOldStyle(gFaces[i].fStyle));
         }
 //        this->setBGColor(0xFFDDDDDD);
     }
@@ -85,7 +86,7 @@
 //        paint.setSubpixelText(true);
         paint.setAntiAlias(true);
         paint.setLCDRenderText(true);
-        paint.setTypeface(SkTypeface::MakeFromName("Times Roman", SkTypeface::kNormal));
+        paint.setTypeface(SkTypeface::MakeFromName("Times Roman", SkFontStyle()));
 
 //        const char* text = "abcdefghijklmnopqrstuvwxyz";
         const char* text = "Hamburgefons ooo mmm";
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index edc2dd7..5858d26 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -625,7 +625,8 @@
     SkScalar x = 20;
     SkScalar y = 80;
     SkPaint paint;
-    paint.setTypeface(SkTypeface::MakeFromName("Georgia", SkTypeface::kItalic));
+    paint.setTypeface(SkTypeface::MakeFromName("Georgia",
+                                               SkFontStyle::FromOldStyle(SkTypeface::kItalic)));
     paint.setTextSize(75);
     paint.setAntiAlias(true);
     paint.setColor(SK_ColorBLUE);
diff --git a/samplecode/SampleXfermodesBlur.cpp b/samplecode/SampleXfermodesBlur.cpp
index 8a69f00..ef25114 100644
--- a/samplecode/SampleXfermodesBlur.cpp
+++ b/samplecode/SampleXfermodesBlur.cpp
@@ -28,7 +28,7 @@
 #include "SkBlurMaskFilter.h"
 
 static void setNamedTypeface(SkPaint* paint, const char name[]) {
-    paint->setTypeface(SkTypeface::MakeFromName(name, SkTypeface::kNormal));
+    paint->setTypeface(SkTypeface::MakeFromName(name, SkFontStyle()));
 }
 
 static uint16_t gBG[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF };
@@ -90,7 +90,7 @@
             SkPaint paint;
             paint.setAntiAlias(true);
             paint.setTextSize(50);
-            paint.setTypeface(SkTypeface::MakeFromName("Arial Unicode MS", SkTypeface::kNormal));
+            paint.setTypeface(SkTypeface::MakeFromName("Arial Unicode MS", SkFontStyle()));
             char buffer[10];
             size_t len = SkUTF8_FromUnichar(0x8500, buffer);
             canvas->drawText(buffer, len, 40, 40, paint);
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index ba9e765..a4e814a 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -27,7 +27,8 @@
 #define SK_TYPEFACE_DELEGATE nullptr
 #endif
 
-sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style ) = nullptr;
+sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char[], SkFontStyle) = nullptr;
+
 void (*gSerializeTypefaceDelegate)(const SkTypeface*, SkWStream* ) = SK_TYPEFACE_DELEGATE;
 sk_sp<SkTypeface> (*gDeserializeTypefaceDelegate)(SkStream* ) = nullptr;
 
@@ -108,18 +109,32 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
+#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME
 sk_sp<SkTypeface> SkTypeface::MakeFromName(const char name[], Style style) {
+  return MakeFromName(name, SkFontStyle::FromOldStyle(style));
+}
+#endif
+
+sk_sp<SkTypeface> SkTypeface::MakeFromName(const char name[],
+                                           SkFontStyle fontStyle) {
     if (gCreateTypefaceDelegate) {
-        sk_sp<SkTypeface> result = (*gCreateTypefaceDelegate)(name, style);
+        sk_sp<SkTypeface> result = (*gCreateTypefaceDelegate)(name, fontStyle);
         if (result) {
             return result;
         }
     }
-    if (nullptr == name) {
-        return MakeDefault(style);
+    if (nullptr == name && (fontStyle.slant() == SkFontStyle::kItalic_Slant ||
+                            fontStyle.slant() == SkFontStyle::kUpright_Slant) &&
+                           (fontStyle.weight() == SkFontStyle::kBold_Weight ||
+                            fontStyle.weight() == SkFontStyle::kNormal_Weight)) {
+        return MakeDefault(static_cast<SkTypeface::Style>(
+            (fontStyle.slant() == SkFontStyle::kItalic_Slant ? SkTypeface::kItalic :
+                                                               SkTypeface::kNormal) |
+            (fontStyle.weight() == SkFontStyle::kBold_Weight ? SkTypeface::kBold :
+                                                               SkTypeface::kNormal)));
     }
     SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
-    return sk_sp<SkTypeface>(fm->legacyCreateTypeface(name, SkFontStyle::FromOldStyle(style)));
+    return sk_sp<SkTypeface>(fm->legacyCreateTypeface(name, fontStyle));
 }
 
 sk_sp<SkTypeface> SkTypeface::MakeFromTypeface(SkTypeface* family, Style s) {
@@ -185,7 +200,9 @@
             return typeface;
         }
     }
-    return SkTypeface::MakeFromName(desc.getFamilyName(), desc.getStyle());
+
+    return SkTypeface::MakeFromName(desc.getFamilyName(),
+                                    SkFontStyle::FromOldStyle(desc.getStyle()));
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/src/fonts/SkTestScalerContext.h b/src/fonts/SkTestScalerContext.h
index 5e77260..a5fa1de 100644
--- a/src/fonts/SkTestScalerContext.h
+++ b/src/fonts/SkTestScalerContext.h
@@ -41,7 +41,7 @@
     mutable unsigned char fDebugBits[16];
     mutable SkUnichar fDebugOverage[8];
     const char* fDebugName;
-    SkTypeface::Style fDebugStyle;
+    SkFontStyle fDebugStyle;
     const char* debugFontName() const { return fName; }
 #endif
 private:
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 4409e47..98880d0 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -2049,7 +2049,7 @@
         }
     }
 
-    sk_sp<SkTypeface> face(SkTypeface::MakeFromName(name, (SkTypeface::Style)style));
+    sk_sp<SkTypeface> face(SkTypeface::MakeFromName(name, SkFontStyle::FromOldStyle(style)));
 //    SkDebugf("---- name <%s> style=%d, face=%p ref=%d\n", name, style, face, face->getRefCnt());
     if (nullptr == face) {
         face = SkTypeface::MakeDefault();
diff --git a/src/utils/SkWhitelistTypefaces.cpp b/src/utils/SkWhitelistTypefaces.cpp
index 3368178..bc454bf 100644
--- a/src/utils/SkWhitelistTypefaces.cpp
+++ b/src/utils/SkWhitelistTypefaces.cpp
@@ -28,7 +28,7 @@
 
 #define SUBNAME_PREFIX "sk_"
 
-static bool font_name_is_local(const char* fontName, SkTypeface::Style style) {
+static bool font_name_is_local(const char* fontName, SkFontStyle style) {
     if (!strcmp(fontName, "DejaVu Sans")) {
         return true;
     }
@@ -162,7 +162,7 @@
         return;
     }
     const char* fontName = whitelist[whitelistIndex].fFontName;
-    if (!font_name_is_local(fontName, tf->style())) {
+    if (!font_name_is_local(fontName, tf->fontStyle())) {
 #if WHITELIST_DEBUG
         SkDebugf("name not found locally \"%s\" style=%d\n", fontName, tf->style());
 #endif
@@ -200,13 +200,13 @@
     if (!strncmp(SUBNAME_PREFIX, familyName, sizeof(SUBNAME_PREFIX) - 1)) {
         familyName += sizeof(SUBNAME_PREFIX) - 1;
     }
-    return SkTypeface::MakeFromName(familyName, desc.getStyle());
+    return SkTypeface::MakeFromName(familyName, SkFontStyle::FromOldStyle(desc.getStyle()));
 }
 
 bool CheckChecksums() {
     for (int i = 0; i < whitelistCount; ++i) {
         const char* fontName = whitelist[i].fFontName;
-        sk_sp<SkTypeface> tf(SkTypeface::MakeFromName(fontName, SkTypeface::kNormal));
+        sk_sp<SkTypeface> tf(SkTypeface::MakeFromName(fontName, SkFontStyle()));
         uint32_t checksum = compute_checksum(tf.get());
         if (whitelist[i].fChecksum != checksum) {
             return false;
@@ -261,7 +261,7 @@
     sk_fwrite(line.c_str(), line.size(), file);
     for (int i = 0; i < whitelistCount; ++i) {
         const char* fontName = whitelist[i].fFontName;
-        sk_sp<SkTypeface> tf(SkTypeface::MakeFromName(fontName, SkTypeface::kNormal));
+        sk_sp<SkTypeface> tf(SkTypeface::MakeFromName(fontName, SkFontStyle()));
         uint32_t checksum = compute_checksum(tf.get());
         line.printf(checksumEntry, fontName, checksum);
         sk_fwrite(line.c_str(), line.size(), file);
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index ec32d9f..66908bc 100644
--- a/tests/FontHostStreamTest.cpp
+++ b/tests/FontHostStreamTest.cpp
@@ -69,7 +69,7 @@
         paint.setColor(SK_ColorGRAY);
         paint.setTextSize(SkIntToScalar(30));
 
-        paint.setTypeface(SkTypeface::MakeFromName("Georgia", SkTypeface::kNormal));
+        paint.setTypeface(SkTypeface::MakeFromName("Georgia", SkFontStyle()));
 
         SkIRect origRect = SkIRect::MakeWH(64, 64);
         SkBitmap origBitmap;
diff --git a/tests/FontHostTest.cpp b/tests/FontHostTest.cpp
index ebcc4ab..811b4b3 100644
--- a/tests/FontHostTest.cpp
+++ b/tests/FontHostTest.cpp
@@ -223,7 +223,7 @@
     };
 
     for (size_t i = 0; i < SK_ARRAY_COUNT(gNames); ++i) {
-        sk_sp<SkTypeface> face(SkTypeface::MakeFromName(gNames[i], SkTypeface::kNormal));
+        sk_sp<SkTypeface> face(SkTypeface::MakeFromName(gNames[i], SkFontStyle()));
         if (face) {
 #ifdef DUMP_TABLES
             SkDebugf("%s\n", gNames[i]);
@@ -277,7 +277,7 @@
     char txt[] = "long.text.with.lots.of.dots.";
 
     for (size_t i = 0; i < SK_ARRAY_COUNT(faces); i++) {
-        paint.setTypeface(SkTypeface::MakeFromName(faces[i], SkTypeface::kNormal));
+        paint.setTypeface(SkTypeface::MakeFromName(faces[i], SkFontStyle()));
 
         for (size_t j = 0; j  < SK_ARRAY_COUNT(settings); j++) {
             paint.setHinting(settings[j].hinting);
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index 414631c..dd280cd 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -64,12 +64,12 @@
     };
 
     for (size_t i = 0; i < SK_ARRAY_COUNT(inNames); ++i) {
-        sk_sp<SkTypeface> first(SkTypeface::MakeFromName(inNames[i], SkTypeface::kNormal));
+        sk_sp<SkTypeface> first(SkTypeface::MakeFromName(inNames[i], SkFontStyle()));
         if (nullptr == first.get()) {
             continue;
         }
         for (int j = 0; j < 10; ++j) {
-            sk_sp<SkTypeface> face(SkTypeface::MakeFromName(inNames[i], SkTypeface::kNormal));
+            sk_sp<SkTypeface> face(SkTypeface::MakeFromName(inNames[i], SkFontStyle()));
     #if 0
             SkString name;
             face->getFamilyName(&name);
diff --git a/tests/FontObjTest.cpp b/tests/FontObjTest.cpp
index 66c8bd5..44f799e 100644
--- a/tests/FontObjTest.cpp
+++ b/tests/FontObjTest.cpp
@@ -78,7 +78,7 @@
     char txt[] = "long.text.with.lots.of.dots.";
 
     for (size_t i = 0; i < SK_ARRAY_COUNT(faces); i++) {
-        paint.setTypeface(SkTypeface::MakeFromName(faces[i], SkTypeface::kNormal));
+        paint.setTypeface(SkTypeface::MakeFromName(faces[i], SkFontStyle()));
 
         for (size_t j = 0; j  < SK_ARRAY_COUNT(settings); j++) {
             paint.setHinting(settings[j].hinting);
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 07ddabc..e438bfe 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -436,7 +436,7 @@
                         !SkPDFFont::CanEmbedTypeface(noEmbedTypeface.get(), &canon));
     }
     sk_sp<SkTypeface> portableTypeface(
-            sk_tool_utils::create_portable_typeface(NULL, SkTypeface::kNormal));
+            sk_tool_utils::create_portable_typeface(NULL, SkFontStyle()));
     REPORTER_ASSERT(reporter,
                     SkPDFFont::CanEmbedTypeface(portableTypeface.get(), &canon));
 }
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 6dbc86b..f109482 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1163,7 +1163,8 @@
     SkPictureRecorder recorder;
     SkCanvas* canvas = recorder.beginRecording(10, 10);
     SkPaint paint;
-    paint.setTypeface(SkTypeface::MakeFromName("Arial", SkTypeface::kItalic));
+    paint.setTypeface(SkTypeface::MakeFromName("Arial",
+                                               SkFontStyle::FromOldStyle(SkTypeface::kItalic)));
     canvas->drawText("Q", 1, 0, 10, paint);
     sk_sp<SkPicture> picture(recorder.finishRecordingAsPicture());
     SkDynamicMemoryWStream stream;
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp
index 6a606d4..13196bc 100644
--- a/tests/TypefaceTest.cpp
+++ b/tests/TypefaceTest.cpp
@@ -12,7 +12,7 @@
 
 DEF_TEST(Typeface, reporter) {
 
-    sk_sp<SkTypeface> t1(SkTypeface::MakeFromName(nullptr, SkTypeface::kNormal));
+    sk_sp<SkTypeface> t1(SkTypeface::MakeFromName(nullptr, SkFontStyle()));
     sk_sp<SkTypeface> t2(SkTypeface::MakeDefault(SkTypeface::kNormal));
 
     REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get()));
@@ -22,7 +22,7 @@
     REPORTER_ASSERT(reporter, SkTypeface::Equal(t2.get(), 0));
 
 #ifdef SK_BUILD_FOR_ANDROID
-    sk_sp<SkTypeface> t3(SkTypeface::MakeFromName("non-existent-font", SkTypeface::kNormal));
+    sk_sp<SkTypeface> t3(SkTypeface::MakeFromName("non-existent-font", SkFontStyle()));
     REPORTER_ASSERT(reporter, nullptr == t3);
 #endif
 }
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp
index 7343ce4..9278c84 100644
--- a/tools/sk_tool_utils.cpp
+++ b/tools/sk_tool_utils.cpp
@@ -80,7 +80,7 @@
         return MakeResourceAsTypeface("/fonts/Funkster.ttf");
     }
     if (!strcmp(sk_tool_utils::platform_os_emoji(), "SBIX")) {
-        return SkTypeface::MakeFromName("Apple Color Emoji", SkTypeface::kNormal);
+        return SkTypeface::MakeFromName("Apple Color Emoji", SkFontStyle());
     }
     return nullptr;
 }
@@ -156,11 +156,11 @@
     return SkPixel16ToColor(color16);
 }
 
-sk_sp<SkTypeface> create_portable_typeface(const char* name, SkTypeface::Style style) {
+sk_sp<SkTypeface> create_portable_typeface(const char* name, SkFontStyle style) {
     return create_font(name, style);
 }
 
-void set_portable_typeface(SkPaint* paint, const char* name, SkTypeface::Style style) {
+void set_portable_typeface(SkPaint* paint, const char* name, SkFontStyle style) {
     paint->setTypeface(create_font(name, style));
 }
 
diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h
index a16c2a2..c4d7c8a 100644
--- a/tools/sk_tool_utils.h
+++ b/tools/sk_tool_utils.h
@@ -72,12 +72,12 @@
      * Sets the paint to use a platform-independent text renderer
      */
     void set_portable_typeface(SkPaint* paint, const char* name = nullptr,
-                               SkTypeface::Style style = SkTypeface::kNormal);
+                               SkFontStyle style = SkFontStyle());
 
     /**
      * Returns a platform-independent text renderer.
      */
-    sk_sp<SkTypeface> create_portable_typeface(const char* name, SkTypeface::Style style);
+    sk_sp<SkTypeface> create_portable_typeface(const char* name, SkFontStyle style);
 
     /** Call to clean up portable font references. */
     void release_portable_typefaces();
@@ -89,7 +89,7 @@
     void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkAlphaType);
 
     // private to sk_tool_utils
-    sk_sp<SkTypeface> create_font(const char* name, SkTypeface::Style);
+    sk_sp<SkTypeface> create_font(const char* name, SkFontStyle);
 
     /** Returns a newly created CheckerboardShader. */
     sk_sp<SkShader> create_checkerboard_shader(SkColor c1, SkColor c2, int size);
diff --git a/tools/sk_tool_utils_font.cpp b/tools/sk_tool_utils_font.cpp
index f73576d..8f701c2 100644
--- a/tools/sk_tool_utils_font.cpp
+++ b/tools/sk_tool_utils_font.cpp
@@ -29,7 +29,7 @@
 
 SK_DECLARE_STATIC_MUTEX(gTestFontMutex);
 
-sk_sp<SkTypeface> create_font(const char* name, SkTypeface::Style style) {
+sk_sp<SkTypeface> create_font(const char* name, SkFontStyle style) {
     SkTestFontData* fontData = nullptr;
     const SubFont* sub;
     if (name) {
@@ -47,8 +47,7 @@
             // If we called SkTypeface::CreateFromName() here we'd recurse infinitely,
             // so we reimplement its core logic here inline without the recursive aspect.
             SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
-            return sk_sp<SkTypeface>(fm->legacyCreateTypeface(name,
-                                                              SkFontStyle::FromOldStyle(style)));
+            return sk_sp<SkTypeface>(fm->legacyCreateTypeface(name, style));
         }
     } else {
         sub = &gSubFonts[gDefaultFontIndex];
@@ -66,7 +65,7 @@
             fontData->fFontCache = SkSafeRef(font);
         }
     }
-    return sk_make_sp<SkTestTypeface>(font, SkFontStyle::FromOldStyle(style));
+    return sk_make_sp<SkTestTypeface>(font, style);
 }
 
 }
diff --git a/tools/test_font_index.cpp b/tools/test_font_index.cpp
index b9bc24c..b52c004 100644
--- a/tools/test_font_index.cpp
+++ b/tools/test_font_index.cpp
@@ -62,36 +62,36 @@
 
 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);