mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
19 lines
554 B
Swift
19 lines
554 B
Swift
import Foundation
|
|
import UIKit
|
|
|
|
public struct Font {
|
|
public static func regular(_ size: CGFloat) -> UIFont {
|
|
return UIFont.systemFont(ofSize: size)
|
|
}
|
|
|
|
public static func medium(_ size: CGFloat) -> UIFont {
|
|
return UIFont.boldSystemFont(ofSize: size)
|
|
}
|
|
}
|
|
|
|
public extension AttributedString {
|
|
convenience init(string: String, font: UIFont, textColor: UIColor = UIColor.black()) {
|
|
self.init(string: string, attributes: [NSFontAttributeName: font, NSForegroundColorAttributeName as String: textColor])
|
|
}
|
|
}
|