aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-06-22 21:11:00 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-22 21:12:58 +0000
commit37a06c063c9a9bb53f8840e8304706c3ff7fe141 (patch)
treece2991d52dbb5d45024928968cd52391a7095f6c /src/ports
parentcce82d2b7c6ce3addd72016191e1be73bc084953 (diff)
Reland "Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig."
This reverts commit cce82d2b7c6ce3addd72016191e1be73bc084953. Reason for revert: Just add suppression. Original change's description: > Revert "Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig." > > This reverts commit 96b1ecc25d00a3d52dcc51a788b0df0acdd1dad9. > > Reason for revert: Breaking Google3, I think > > Original change's description: > > Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig. > > > > Create FontMgrFontConfigTest.cpp file to test the above function. > > > > Change-Id: I7716355f702af3d6f25574305914f0b82a4147ce > > Reviewed-on: https://skia-review.googlesource.com/137133 > > Reviewed-by: Ben Wagner <bungeman@google.com> > > Commit-Queue: Ben Wagner <bungeman@google.com> > > TBR=bungeman@google.com,herb@google.com,brucewang@google.com > > Change-Id: I665de46d379f1b533358f0be644814aa4bfffb33 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/137240 > Reviewed-by: Kevin Lubick <kjlubick@google.com> > Commit-Queue: Kevin Lubick <kjlubick@google.com> TBR=bungeman@google.com,herb@google.com,kjlubick@google.com,brucewang@google.com Change-Id: I41f0e4505ed0579a77a56212898e9a6caf6f1ed5 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/137260 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontMgr_fontconfig.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index 3589ae8100..e5aed18c60 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -525,6 +525,21 @@ public:
return info;
}
+ sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
+ std::unique_ptr<SkFontData> data = this->cloneFontData(args);
+ if (!data) {
+ return nullptr;
+ }
+
+ SkString fFamilyName;
+ this->getFamilyName(&fFamilyName);
+
+ return sk_make_sp<SkTypeface_stream>(std::move(data),
+ fFamilyName,
+ this->fontStyle(),
+ this->isFixedPitch());
+ }
+
~SkTypeface_fontconfig() override {
// Hold the lock while unrefing the pattern.
FCLocker lock;