//
//  Font+Extension.swift
//  U17
//
//  Created by Lee on 2/22/20.
//  Copyright © 2020 Lee. All rights reserved.
//


import UIKit


extension UIFont {
    
    // MARK: - 苹方字体
    static let PH18 : UIFont = font(18, FontName.PingFang_SC.Heavy)
    
    /// 22 Semibold
    static let PS22 : UIFont = font(22, FontName.PingFang_SC.Semibold)
    /// 20 Semibold
    static let PS20 : UIFont = font(20, FontName.PingFang_SC.Semibold)
    /// 18 Semibold
    static let PS18 : UIFont = font(18, FontName.PingFang_SC.Semibold)
    /// 17 Semibold
    static let PS17 : UIFont = font(17, FontName.PingFang_SC.Semibold)
    /// 16 Semibold
    static let PS16 : UIFont = font(16, FontName.PingFang_SC.Semibold)
    /// 14 Semibold
    static let PS14 : UIFont = font(14, FontName.PingFang_SC.Semibold)
    /// 13 Semibold
    static let PS13 : UIFont = font(13, FontName.PingFang_SC.Semibold)
    /// 12 Semibold
    static let PS12 : UIFont = font(12, FontName.PingFang_SC.Semibold)
    /// 11 Semibold
    static let PS11 : UIFont = font(11, FontName.PingFang_SC.Semibold)
    /// 10 Semibold
    static let PS10 : UIFont = font(10, FontName.PingFang_SC.Semibold)
    
    
    /// 20 Medium
    static let PM27 : UIFont = font(27, FontName.PingFang_SC.Medium)
    /// 20 Medium
    static let PM20 : UIFont = font(20, FontName.PingFang_SC.Medium)
    /// 18 Medium
    static let PM18 : UIFont = font(18, FontName.PingFang_SC.Medium)
    /// 17 Medium
    static let PM17 : UIFont = font(17, FontName.PingFang_SC.Medium)
    /// 16 Medium
    static let PM16 : UIFont = font(16, FontName.PingFang_SC.Medium)
    /// 14 Medium
    static let PM14 : UIFont = font(14, FontName.PingFang_SC.Medium)
    /// 13 Medium
    static let PM13 : UIFont = font(13, FontName.PingFang_SC.Medium)
    /// 12 Medium
    static let PM12 : UIFont = font(12, FontName.PingFang_SC.Medium)
    /// 11 Medium
    static let PM11 : UIFont = font(11, FontName.PingFang_SC.Medium)
    /// 10 Medium
    static let PM10 : UIFont = font(10, FontName.PingFang_SC.Medium)
    
    /// 20 Regular
    static let PR20 : UIFont = font(20, FontName.PingFang_SC.Regular)
    /// 18 Regular
    static let PR18 : UIFont = font(18, FontName.PingFang_SC.Regular)
    /// 17 Regular
    static let PR17 : UIFont = font(17, FontName.PingFang_SC.Regular)
    /// 16 Regular
    static let PR16 : UIFont = font(16, FontName.PingFang_SC.Regular)
    /// 15 Regular
    static let PR15 : UIFont = font(15, FontName.PingFang_SC.Regular)
    /// 14 Regular
    static let PR14 : UIFont = font(14, FontName.PingFang_SC.Regular)
    /// 13 Regular
    static let PR13 : UIFont = font(13, FontName.PingFang_SC.Regular)
    /// 12 Regular
    static let PR12 : UIFont = font(12, FontName.PingFang_SC.Regular)
    /// 11 Regular
    static let PR11 : UIFont = font(11, FontName.PingFang_SC.Regular)
    /// 10 Regular
    static let PR10 : UIFont = font(10, FontName.PingFang_SC.Regular)
    
    
    // MARK: - San Francisco Text
    
    /// 20 Regular
    static let SM20 : UIFont = font(20, FontName.SF_Pro_Text.Medium)
    /// 18 Regular
    static let SM18 : UIFont = font(18, FontName.SF_Pro_Text.Medium)
    /// 17 Regular
    static let SM17 : UIFont = font(17, FontName.SF_Pro_Text.Medium)
    /// 16 Regular
    static let SM16 : UIFont = font(16, FontName.SF_Pro_Text.Medium)
    /// 14 Regular
    static let SM14 : UIFont = font(14, FontName.SF_Pro_Text.Medium)
    /// 13 Regular
    static let SM13 : UIFont = font(13, FontName.SF_Pro_Text.Medium)
    /// 12 Regular
    static let SM12 : UIFont = font(12, FontName.SF_Pro_Text.Medium)
    /// 11 Regular
    static let SM11 : UIFont = font(11, FontName.SF_Pro_Text.Medium)
    /// 10 Regular
    static let SM10 : UIFont = font(10, FontName.SF_Pro_Text.Medium)
    
    /// 20 Semibold
    static let SS50 : UIFont = font(50, FontName.SF_Pro_Text.Semibold)
    /// 20 Semibold
    static let SS20 : UIFont = font(20, FontName.SF_Pro_Text.Semibold)
    /// 18 Semibold
    static let SS18 : UIFont = font(18, FontName.SF_Pro_Text.Semibold)
    /// 17 Semibold
    static let SS17 : UIFont = font(17, FontName.SF_Pro_Text.Semibold)
    /// 16 Semibold
    static let SS16 : UIFont = font(16, FontName.SF_Pro_Text.Semibold)
    /// 14 Semibold
    static let SS14 : UIFont = font(14, FontName.SF_Pro_Text.Semibold)
    /// 13 Semibold
    static let SS13 : UIFont = font(13, FontName.SF_Pro_Text.Semibold)
    /// 12 Semibold
    static let SS12 : UIFont = font(12, FontName.SF_Pro_Text.Semibold)
    /// 11 Semibold
    static let SS11 : UIFont = font(11, FontName.SF_Pro_Text.Semibold)
    /// 10 Semibold
    static let SS10 : UIFont = font(10, FontName.SF_Pro_Text.Semibold)
    
    /// 24 Regular
    static let SR24 : UIFont = font(24, FontName.SF_Pro_Text.Regular)
    /// 20 Regular
    static let SR20 : UIFont = font(20, FontName.SF_Pro_Text.Regular)
    /// 18 Regular
    static let SR18 : UIFont = font(18, FontName.SF_Pro_Text.Regular)
    /// 17 Regular
    static let SR17 : UIFont = font(17, FontName.SF_Pro_Text.Regular)
    /// 16 Regular
    static let SR16 : UIFont = font(16, FontName.SF_Pro_Text.Regular)
    /// 14 Regular
    static let SR14 : UIFont = font(14, FontName.SF_Pro_Text.Regular)
    /// 13 Regular
    static let SR13 : UIFont = font(13, FontName.SF_Pro_Text.Regular)
    /// 12 Regular
    static let SR12 : UIFont = font(12, FontName.SF_Pro_Text.Regular)
    /// 11 Regular
    static let SR11 : UIFont = font(11, FontName.SF_Pro_Text.Regular)
    /// 10 Regular
    static let SR10 : UIFont = font(10, FontName.SF_Pro_Text.Regular)    
    
    // MARK: - DIN-Alternate
    
    /// 64 Bold
    static let D64 : UIFont = font(64, FontName.DINAlternate.Bold)
    
    /// 42 Bold
    static let D42 : UIFont = font(42, FontName.DINAlternate.Bold)
    
    /// 34 Bold
    static let D34 : UIFont = font(34, FontName.DINAlternate.Bold)
    
    /// 26 Bold
    static let D26 : UIFont = font(26, FontName.DINAlternate.Bold)
    
    /// 24 Bold
    static let D24 : UIFont = font(24, FontName.DINAlternate.Bold)
    
    /// 22 Bold
    static let D22 : UIFont = font(22, FontName.DINAlternate.Bold)
    
    /// 18 Bold
    static let D18 : UIFont = font(18, FontName.DINAlternate.Bold)
    
    /// 12 Bold
    static let D12 : UIFont = font(12, FontName.DINAlternate.Bold)
    
    /// 11 Bold
    static let D11 : UIFont = font(11, FontName.DINAlternate.Bold)
    
    
    
    private static func font(_ size:CGFloat,_ name:String) -> UIFont {
        return UIFont.init(name: name, size: (size)¡)!
    }
    
    public struct FontName {
        /// 平方
        struct PingFang_SC {
            static let Medium : String = "PingFangSC-Medium"
            static let Semibold : String = "PingFangSC-Semibold"
            static let Light : String = "PingFangSC-Light"
            static let Ultralight : String = "PingFangSC-Ultralight"
            static let Regular : String = "PingFangSC-Regular"
            static let Thin : String = "PingFangSC-Thin"
            static let Heavy : String = "PingFangSC-Heavy"
        }
        
        struct SF_Pro_Text {
            static let Medium : String = "SFProText-Medium"
            static let Bold : String = "SFProText-Bold"
            static let Regular : String = "SFProText-Regular"
            static let Semibold : String = "SFProText-Semibold"
            static let Light : String = "SFProText-Light"
        }
        
        struct DINAlternate {
            static let Bold : String = "DINAlternate-Bold"
        }
    }
}



