adds first version of the app

This commit is contained in:
2026-10-17 14:33:43 +02:00
parent ab1abadcd1
commit 7b891819b0
3066 changed files with 29585 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import AppKit
/// OpenDyslexic for all text; the system font when the bundled face is missing.
public enum PlakFonts {
public static let regular = "OpenDyslexic-Regular"
public static func body(_ size: CGFloat) -> NSFont {
FontRegistry.registerBundledFonts()
return NSFont(name: regular, size: size) ?? .systemFont(ofSize: size)
}
/// The height of one line of this font with no paragraph style.
static func naturalLineHeight(_ font: NSFont) -> CGFloat {
ceil(font.ascender - font.descender + font.leading)
}
}