//
//  gmFont.m
//  Gengmei
//
//  Created by Thierry on 2/9/15.
//  Copyright (c) 2015 Wanmeichuangyi. All rights reserved.
//
#import "GMFont.h"
#import "SystemVersion.h"

/*
 Family:'PingFang SC'
 font:'PingFangSC-Medium'
 font:'PingFangSC-Semibold'
 font:'PingFangSC-Light'
 font:'PingFangSC-Ultralight'
 font:'PingFangSC-Regular'
 font:'PingFangSC-Thin'
 */
@implementation UIFont (gmFont)
+ (UIFont *)gmFont:(NSInteger)size {
    if (@available(iOS 9.0, *)) {
        return [UIFont fontWithName:@"PingFangSC-Regular" size:size];
    } else {
        return [UIFont systemFontOfSize:size];
    }
}

+ (UIFont *)gmBoldFont:(NSInteger)size {
    if (@available(iOS 9.0, *)) {
        return [UIFont fontWithName:@"PingFangSC-Medium" size:size];
    } else {
        return [UIFont boldSystemFontOfSize:size];
    }
}

+ (UIFont *)gmLightFont:(NSInteger)size {
    if (@available(iOS 9.0, *)) {
        return [UIFont fontWithName:@"PingFangSC-Light" size:size];
    } else {
        return [UIFont systemFontOfSize:size];
    }
}

@end



