updates plug with all sorts of awesome improvements

This commit is contained in:
2026-11-09 13:09:09 +01:00
parent a92d6f8871
commit 3afdb6d67f
553 changed files with 22780 additions and 13155 deletions
+3 -6
View File
@@ -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.