// // NSFont+SFProText.swift // PDF Master // // Created by lizhe on 2023/2/8. // import Foundation extension NSFont { @objc static func SFProTextRegular(_ size: CGFloat) -> NSFont { return NSFont(name: "SFProText-Regular", size: max(1, size)) ?? NSFont.systemFont(ofSize: max(1, size)) } @objc static func SFProTextSemibold(_ size: CGFloat) -> NSFont { return NSFont(name: "SFProText-Semibold", size: max(1, size)) ?? NSFont.systemFont(ofSize: max(1, size)) } @objc static func SFProTextBold(_ size: CGFloat) -> NSFont { return NSFont(name: "SFProText-Bold", size: max(1, size)) ?? NSFont.systemFont(ofSize: max(1, size)) } }