//
//  UIFont+Titi.m
//  FornoWorld
//
//  Created by RD on 2021/7/30.
//

#import "UIFont+Titi.h"

@implementation UIFont (Titi)

+ (UIFont *)rds_titiFontStyle:(FontStyle)fontStyle size:(CGFloat)size{
    
    NSString *fontName = @"PingFangSC-Regular";
    
        switch (fontStyle) {
            case FontStyle_Black:
                fontName = @"TitilliumWeb-Black";
                break;
            case FontStyle_Bold:
                fontName = @"TitilliumWeb-Bold";
                break;
            case FontStyle_BoldItalic:
                fontName = @"TitilliumWeb-BoldItalic";
                break;
            case FontStyle_Italic:
                fontName = @"TitilliumWeb-Italic";
                break;
            case FontStyle_Light:
                fontName = @"TitilliumWeb-Light";
                break;
            case FontStyle_LightItalic:
                fontName = @"TitilliumWeb-LightItalic";
                break;
            case FontStyle_Regular:
                fontName = @"TitilliumWeb-Regular";
                break;
            case FontStyle_SemiBold:
                fontName = @"TitilliumWeb-SemiBold";
                break;
            case FontStyle_SemiBoldItalic:
                fontName = @"TitilliumWeb-SemiBoldItalic";
                break;
            case FontStyle_Thin:
                fontName = @"TitilliumWeb-Thin";
                break;
            case FontStyle_ThinItalic:
                fontName = @"TitilliumWeb-ThinItalic";
                break;
        }

        UIFont *font = [UIFont fontWithName:fontName size:size];

        return font ?: [UIFont systemFontOfSize:size];
}
@end
