aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/fonts/SkTestFontMgr.cpp
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2018-03-23 14:39:42 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-23 14:39:51 +0000
commitaf78a942179143e4646871fc797e2ce17c23a594 (patch)
treee1df52c03c579436005b1098a500a3523c816000 /tools/fonts/SkTestFontMgr.cpp
parent8c53d465e3ceb3898f8037b61046c198bbec2fca (diff)
Revert "Add color fonts."
This reverts commit c912d6133c66df7cde3d64adc76941856a12da64. Reason for revert: Causing TSAN issues. Original change's description: > Add color fonts. > > BUG=skia:7624 > > Change-Id: Id2b7449048591892ff802484d5e3745a7e1402bb > 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> TBR=mtklein@google.com,bungeman@google.com,herb@google.com Change-Id: I2ccd1f00e91bb92b7059323c95da0dd3de954164 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7624 Reviewed-on: https://skia-review.googlesource.com/116141 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'tools/fonts/SkTestFontMgr.cpp')
-rw-r--r--tools/fonts/SkTestFontMgr.cpp28
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];
};
}