Skip to content

Commit

Permalink
NSUIFontDescriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Mar 26, 2024
1 parent 75bc8a8 commit c47d9e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ NSUIButton
NSUIColor
NSUIEdgeInsets
NSUIFont
NSUIFontDescriptor
NSUIHostingController
NSUIImage
NSUILongPressGestureRecognizer
Expand Down
1 change: 1 addition & 0 deletions Sources/NSUI/Aliases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public typealias NSUICollectionViewDelegateFlowLayout = UICollectionViewDelegate
public typealias NSUIColor = UIColor
public typealias NSUIEdgeInsets = UIEdgeInsets
public typealias NSUIFont = UIFont
public typealias NSUIFontDescriptor = UIFontDescriptor
public typealias NSUIImage = UIImage
public typealias NSUIImageView = UIImageView
public typealias NSUILabel = UILabel
Expand Down
10 changes: 10 additions & 0 deletions Sources/NSUI/FontDescriptor.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#if canImport(AppKit) && !targetEnvironment(macCatalyst)
import AppKit

typealias NSUIFontDescriptor = NSFontDescriptor
extension NSUIFontDescriptor.SymbolicTraits {
static let traitItalic = Self.italic
static let traitBold = Self.bold
}

#endif

0 comments on commit c47d9e2

Please sign in to comment.