diff options
author | 2018-03-27 18:15:53 +0000 | |
---|---|---|
committer | 2018-03-27 18:16:04 +0000 | |
commit | 3560b58de36988e1fba54d9ac341735ab849e913 (patch) | |
tree | bedddd24f268048bf5974914fd9ba81c8d35e018 /tools/fonts/SkTestFontMgr.cpp | |
parent | 83ee463c315851c53f6368fcc3df0a30b0052a57 (diff) |
Revert "Add color fonts."
This reverts commit d3b933f3e03d5c22e9e7c56d2110469e41509720.
Reason for revert: we're not mirroring experimental/ everywhere.
Original change's description:
> Add color fonts.
>
> BUG=skia:7624
>
> Change-Id: I1d0974282adce2fd7b13a003309e63593b6e1a9c
> Reviewed-on: https://skia-review.googlesource.com/109521
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-on: https://skia-review.googlesource.com/116541
TBR=mtklein@google.com,bungeman@google.com,herb@google.com
Change-Id: Ic2d763244cbce663a23eb53321ac45201c466501
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7624
Reviewed-on: https://skia-review.googlesource.com/116680
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tools/fonts/SkTestFontMgr.cpp')
-rw-r--r-- | tools/fonts/SkTestFontMgr.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/tools/fonts/SkTestFontMgr.cpp b/tools/fonts/SkTestFontMgr.cpp index 4513a2f8d1..3b5d1589f2 100644 --- a/tools/fonts/SkTestFontMgr.cpp +++ b/tools/fonts/SkTestFontMgr.cpp @@ -8,8 +8,6 @@ #include "SkFontDescriptor.h" #include "SkTestFontMgr.h" #include "sk_tool_utils.h" -#include "SkTestTypeface.h" -#include "SkTestSVGTypeface.h" namespace { @@ -17,28 +15,6 @@ static constexpr const char* kFamilyNames[] = { "Toy Liberation Sans", "Toy Liberation Serif", "Toy Liberation Mono", - "Emoji", -}; - -class JustOneTypefaceStyleSet final : public SkFontStyleSet { -public: - explicit JustOneTypefaceStyleSet(sk_sp<SkTypeface> typeface) : fTypeface(std::move(typeface)) {} - int count() override { return 1; } - - void getStyle(int index, SkFontStyle* style, SkString* name) override { - if (style) { *style = SkFontStyle::Normal(); } - if (name) { *name = "Normal"; } - } - - SkTypeface* createTypeface(int index) override { - return SkRef(fTypeface.get()); - } - - SkTypeface* matchStyle(const SkFontStyle& pattern) override { - return this->matchStyleCSS3(pattern); - } -private: - sk_sp<SkTypeface> fTypeface; }; class FontStyleSet final : public SkFontStyleSet { @@ -93,7 +69,6 @@ public: fFamilies[0] = sk_make_sp<FontStyleSet>(0); fFamilies[1] = sk_make_sp<FontStyleSet>(1); fFamilies[2] = sk_make_sp<FontStyleSet>(2); - fFamilies[3] = sk_make_sp<JustOneTypefaceStyleSet>(SkTestSVGTypeface::Default()); } int onCountFamilies() const override { return SK_ARRAY_COUNT(fFamilies); } @@ -111,7 +86,6 @@ public: if (strstr(familyName, "ans")) { return this->createStyleSet(0); } if (strstr(familyName, "erif")) { return this->createStyleSet(1); } if (strstr(familyName, "ono")) { return this->createStyleSet(2); } - if (strstr(familyName, "oji")) { return this->createStyleSet(3); } } return this->createStyleSet(0); } @@ -164,7 +138,7 @@ public: } private: - sk_sp<SkFontStyleSet> fFamilies[4]; + sk_sp<FontStyleSet> fFamilies[3]; }; } |