Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Nils André-Chang <[email protected]>
Ning Liu <[email protected]>
Noah Lavine <[email protected]>
Oliver Dawes <[email protected]>
Omeid Matten <[email protected]>
Opera Software ASA <*@opera.com>
Pavel Krajcevski <[email protected]>
Petar Kirov <[email protected]>
Expand Down
4 changes: 1 addition & 3 deletions modules/skparagraph/include/TypefaceFontProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ class TypefaceFontProvider : public SkFontMgr {
sk_sp<SkFontStyleSet> onMatchFamily(const char familyName[]) const override;

sk_sp<SkFontStyleSet> onCreateStyleSet(int) const override { return nullptr; }
sk_sp<SkTypeface> onMatchFamilyStyle(const char[], const SkFontStyle&) const override {
return nullptr;
}
sk_sp<SkTypeface> onMatchFamilyStyle(const char familyName[], const SkFontStyle& pattern) const override;
sk_sp<SkTypeface> onMatchFamilyStyleCharacter(const char[], const SkFontStyle&,
const char*[], int,
SkUnichar) const override {
Expand Down
10 changes: 10 additions & 0 deletions modules/skparagraph/src/TypefaceFontProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ sk_sp<SkFontStyleSet> TypefaceFontProvider::onMatchFamily(const char familyName[
return nullptr;
}


sk_sp<SkTypeface> TypefaceFontProvider::onMatchFamilyStyle(const char familyName[], const SkFontStyle& pattern) const {
sk_sp<SkFontStyleSet> sset(this->matchFamily(familyName));
if (sset) {
return sset->matchStyle(pattern);
}

return nullptr;
}

size_t TypefaceFontProvider::registerTypeface(sk_sp<SkTypeface> typeface) {
if (typeface == nullptr) {
return 0;
Expand Down