updates plug with all sorts of awesome improvements
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
import AppKit
|
||||
|
||||
/// OpenDyslexic for text, OpenDyslexic Mono for code and tables; a system font when a bundled face is missing.
|
||||
/// IBM Plex Mono for the page, code, tables and bookmarks, IBM Plex Sans for the banner; the system fonts when Plex is missing.
|
||||
public enum PlakFonts {
|
||||
public static let regular = "OpenDyslexic-Regular"
|
||||
public static let monoRegular = "OpenDyslexicMono-Regular"
|
||||
|
||||
public static func body(_ size: CGFloat) -> NSFont {
|
||||
FontRegistry.registerBundledFonts()
|
||||
return NSFont(name: regular, size: size) ?? .systemFont(ofSize: size)
|
||||
return NSFont(name: "IBMPlexSans-Regular", size: size) ?? NSFont.systemFont(ofSize: size)
|
||||
}
|
||||
|
||||
public static func mono(_ size: CGFloat) -> NSFont {
|
||||
FontRegistry.registerBundledFonts()
|
||||
return NSFont(name: monoRegular, size: size) ?? .monospacedSystemFont(ofSize: size, weight: .regular)
|
||||
return NSFont(name: "IBMPlexMono-Regular", size: size) ?? NSFont.monospacedSystemFont(ofSize: size, weight: .regular)
|
||||
}
|
||||
|
||||
/// The height of one line of this font with no paragraph style.
|
||||
|
||||
Reference in New Issue
Block a user