mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-17 02:49:57 +00:00
19 lines
564 B
Swift
19 lines
564 B
Swift
import Foundation
|
|
import UIKit
|
|
|
|
public struct Font {
|
|
public static func regular(size: CGFloat) -> UIFont {
|
|
return UIFont.systemFontOfSize(size)
|
|
}
|
|
|
|
public static func medium(size: CGFloat) -> UIFont {
|
|
return UIFont.boldSystemFontOfSize(size)
|
|
}
|
|
}
|
|
|
|
public extension NSAttributedString {
|
|
convenience init(string: String, font: UIFont, textColor: UIColor = UIColor.blackColor()) {
|
|
self.init(string: string, attributes: [kCTFontAttributeName as String: font, kCTForegroundColorAttributeName as String: textColor])
|
|
}
|
|
}
|