add simpler constructor for SkFont

Bug: skia:
Change-Id: I344574cfbba05f013c8844d1a33d680094506ad2
Reviewed-on: https://skia-review.googlesource.com/c/177079
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2018-12-13 08:38:22 -05:00 committed by Skia Commit-Bot
parent c9b7c720dd
commit ea908a1fbe
2 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,9 @@ public:
*/
SkFont(sk_sp<SkTypeface> typeface, SkScalar size);
// Experimental
SkFont(sk_sp<SkTypeface> typeface);
/** Constructs SkFont with default values with SkTypeface and size in points,
horizontal scale, and horizontal skew. Horizontal scale emulates condensed

View File

@ -39,6 +39,8 @@ SkFont::SkFont(sk_sp<SkTypeface> face, SkScalar size, SkScalar scaleX, SkScalar
SkFont::SkFont(sk_sp<SkTypeface> face, SkScalar size) : SkFont(std::move(face), size, 1, 0) {}
SkFont::SkFont(sk_sp<SkTypeface> face) : SkFont(std::move(face), kDefault_Size, 1, 0) {}
SkFont::SkFont() : SkFont(nullptr, kDefault_Size) {}
bool SkFont::operator==(const SkFont& b) const {