mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
14 lines
339 B
Swift
14 lines
339 B
Swift
import CoreGraphics
|
|
import DivKit
|
|
import Foundation
|
|
import VGSL
|
|
|
|
extension String {
|
|
func withTypo(size: CGFloat, weight: DivFontWeight = .regular) -> NSAttributedString {
|
|
let typo = Typo(
|
|
font: AppComponents.fontProvider.font(weight: weight, size: size)
|
|
)
|
|
return NSAttributedString(string: self).with(typo: typo)
|
|
}
|
|
}
|