Skip to content

Commit

Permalink
split class
Browse files Browse the repository at this point in the history
  • Loading branch information
tichise committed Jul 8, 2016
1 parent 26ded08 commit 7ce2428
Show file tree
Hide file tree
Showing 4 changed files with 489 additions and 456 deletions.
27 changes: 27 additions & 0 deletions Sources/EntypoFont.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// EntypoFont
//
// Created by tichise on 2015/5/7 15/05/07.
// Copyright (c) 2015 tichise. All rights reserved.
//

import UIKit

public class EntypoFont {

public class func fontOfSize(fontSize: CGFloat) -> UIFont {

struct Static {
static var onceToken : dispatch_once_t = 0
}

let name = "entypo"
if (UIFont.fontNamesForFamilyName(name).count == 0) {
dispatch_once(&Static.onceToken) {
FontLoader.loadFont(name)
}
}

return UIFont(name: name, size: fontSize)!
}
}
Loading

0 comments on commit 7ce2428

Please sign in to comment.