Remove SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME.
The define SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME is no longer used by any clients and the code it guards can now be removed as well. TBR=reed This just removes dead code. Review-Url: https://codereview.chromium.org/2030983002
This commit is contained in:
parent
21c5ec62aa
commit
da1aedaf13
@ -109,20 +109,8 @@ public:
|
||||
@return reference to the closest-matching typeface. Call must call
|
||||
unref() when they are done.
|
||||
*/
|
||||
static sk_sp<SkTypeface> MakeFromName(const char familyName[],
|
||||
SkFontStyle fontStyle);
|
||||
static sk_sp<SkTypeface> MakeFromName(const char familyName[], SkFontStyle fontStyle);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME
|
||||
/** Return the typeface that most closely matches the requested familyName and style.
|
||||
Pass nullptr as the familyName to request the default font for the requested style.
|
||||
Will never return nullptr.
|
||||
|
||||
@param familyName May be NULL. The name of the font family.
|
||||
@param style The style (normal, bold, italic) of the typeface.
|
||||
@return the closest-matching typeface.
|
||||
*/
|
||||
static sk_sp<SkTypeface> MakeFromName(const char familyName[], Style style);
|
||||
#endif
|
||||
#ifdef SK_SUPPORT_LEGACY_TYPEFACE_PTR
|
||||
static SkTypeface* CreateFromName(const char familyName[], Style style) {
|
||||
return MakeFromName(familyName, SkFontStyle::FromOldStyle(style)).release();
|
||||
|
@ -109,12 +109,6 @@ bool SkTypeface::Equal(const SkTypeface* facea, const SkTypeface* faceb) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME
|
||||
sk_sp<SkTypeface> SkTypeface::MakeFromName(const char name[], Style style) {
|
||||
return MakeFromName(name, SkFontStyle::FromOldStyle(style));
|
||||
}
|
||||
#endif
|
||||
|
||||
sk_sp<SkTypeface> SkTypeface::MakeFromName(const char name[],
|
||||
SkFontStyle fontStyle) {
|
||||
if (gCreateTypefaceDelegate) {
|
||||
|
Loading…
Reference in New Issue
Block a user