This commit is contained in:
Xinlei(Ryan) Pan 2020-02-26 13:34:01 -05:00
parent 80b2513feb
commit fcc21ebf28
2 changed files with 8 additions and 7 deletions

View File

@ -17,17 +17,16 @@ extern NSString * _Nonnull const TXRegular;
@interface MFFonts : NSObject
///return mfFontTXBold when size smaller than 15, otherwise, return mfFontDSBold
+ (nonnull UIFont *)mfFont75Bd:(CGFloat)size;
///return mfFontTXRegular when size smaller than 15, otherwise, return mfFontDSRegular
+ (nonnull UIFont *)mfFont55Rg:(CGFloat)size;
//mva 3.0 font, should use mfFont75Bd/55Rg in most case.
//mva 3.0 font, should use MFStyler.getMVA3FontSize:bold: instead, in most case.
+ (nonnull UIFont *)mfFontDSBold:(CGFloat)size;
+ (nonnull UIFont *)mfFontDSRegular:(CGFloat)size;
+ (nonnull UIFont *)mfFontTXBold:(CGFloat)size;
+ (nonnull UIFont *)mfFontTXRegular:(CGFloat)size;
///return mfFontTXBold when size smaller than 15, otherwise, return mfFontDSBold
+ (nonnull UIFont *)mfFont75Bd:(CGFloat)size;
///return mfFontTXRegular when size smaller than 15, otherwise, return mfFontDSRegular
+ (nonnull UIFont *)mfFont55Rg:(CGFloat)size;
+ (nullable UIFont *)mfFontOcratxt:(CGFloat)size;
+ (nonnull UIFont *)mfFontWithName:(nonnull NSString *)name size:(CGFloat)size;

View File

@ -14,8 +14,10 @@
@implementation UIFont (FontWrapping)
- (UIFont *)updateFontSize:(CGFloat)size {
if ([self.familyName isEqualToString:@"Verizon NHG eDS"] || [self.familyName isEqualToString:@"Verizon NHG eTX"]) {
if ([self.familyName isEqualToString:@"Verizon NHG eDS"]) {
return [MFStyler getMVA3FontSize:size bold:[self.fontName isEqualToString:DSBold]];
} else if ([self.familyName isEqualToString:@"Verizon NHG eTX"]) {
return [MFStyler getMVA3FontSize:size bold:[self.fontName isEqualToString:TXBold]];
} else {
return [self fontWithSize:size];
}