-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
64 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Legal | ||
|
||
By submitting a pull request, you represent that you have the right to license | ||
your contribution to ZeeZide and the community, and agree by submitting the patch | ||
that your contributions are licensed under the MIT license. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// | ||
// UXKit | ||
// | ||
// Copyright © 2016-2017 ZeeZide GmbH. All rights reserved. | ||
// Copyright © 2016-2021 ZeeZide GmbH. All rights reserved. | ||
// | ||
#if os(macOS) | ||
import Cocoa | ||
|
||
public typealias UXFont = NSFont | ||
public typealias UXFont = NSFont | ||
public typealias NSUnderlineStyle = AppKit.NSUnderlineStyle | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
// | ||
// UXKit | ||
// | ||
// Copyright © 2016-2017 ZeeZide GmbH. All rights reserved. | ||
// Copyright © 2016-2021 ZeeZide GmbH. All rights reserved. | ||
// | ||
#if !os(macOS) | ||
import UIKit | ||
|
||
public typealias UXFont = UIFont | ||
#endif | ||
public typealias UXFont = UIFont | ||
public typealias NSUnderlineStyle = UIKit.NSUnderlineStyle | ||
|
||
public extension UXFont { | ||
|
||
/** | ||
* macOS compat. Only works on iOS 13+ (otherwise returns nil). | ||
* | ||
* Calls into `UIFont.monospacedSystemFont()`. | ||
*/ | ||
static func userFixedPitchFont(ofSize size: CGFloat) -> UXFont? { | ||
if #available(iOS 13.0, *) { | ||
return UIFont.monospacedSystemFont(ofSize: size, weight: .regular) | ||
} | ||
else { | ||
return nil | ||
} | ||
} | ||
} | ||
#endif // !os(macOS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
UXKit.xcodeproj/xcshareddata/xcschemes/UXKit-AllPlatforms.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters