aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-10-06 16:05:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-09 03:13:33 +0000
commit67ef5d76406d702e7afe4ec5b490a75d9bcaba10 (patch)
treeb451bec6c3d5eb4d475f640890313348426bef06 /include
parent92d3bc9c9f11c3a013f0006ac5694944fecc8191 (diff)
Remove SkTypeface::Style use in API.
All known callers of SkTypeface::MakeDefault call it with kNormal and the only users specifying kNormal explicitly are in Skia, so remove the parameter. There appear to be no users of SkTypeface::MakeFromTypeface, so remove it. The current alternative is SkFontMgr::matchFaceStyle which can do a better job anyway. Change-Id: I89d94c77f9593407b0a319786848a8b823fcbae4 Reviewed-on: https://skia-review.googlesource.com/56762 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkTypeface.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 0b65ba9151..5a821716a3 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -99,8 +99,8 @@ public:
*/
static bool Equal(const SkTypeface* facea, const SkTypeface* faceb);
- /** Returns the default typeface, which is never nullptr. */
- static sk_sp<SkTypeface> MakeDefault(Style style = SkTypeface::kNormal);
+ /** Returns the default normal typeface, which is never nullptr. */
+ static sk_sp<SkTypeface> MakeDefault();
/** Creates a new reference to the typeface that most closely matches the
requested familyName and fontStyle. This method allows extended font
@@ -113,16 +113,6 @@ public:
*/
static sk_sp<SkTypeface> MakeFromName(const char familyName[], SkFontStyle fontStyle);
- /** Return the typeface that most closely matches the requested typeface and style.
- Use this to pick a new style from the same family of the existing typeface.
- If family is nullptr, this selects from the default font's family.
-
- @param family May be NULL. The name of the existing type face.
- @param s The style (normal, bold, italic) of the type face.
- @return the closest-matching typeface.
- */
- static sk_sp<SkTypeface> MakeFromTypeface(SkTypeface* family, Style);
-
/** Return a new typeface given a file. If the file does not exist, or is
not a valid font file, returns nullptr.
*/