// // ProseTypography.swift // Museion // // #72 rework: single-user app — the prose typography is hardcoded constants, // dialled in on Alexander's exact fonts (Valkyrie OT B body / Concourse OT // headings / UbuntuMono code). The Settings typography/flow sections are // gone; the reading surface's look lives in Museion/Resources/reading.css // (editable while the app runs). These constants feed the EDITING surface; // the CSS :root block is the source of truth for reading. // import AppKit /// Prose typography constants (#72 rework). The editing surface reads these; /// reading mode reads Resources/reading.css. nonisolated enum ProseTypography { /// Body = Valkyrie OT B (the screen cut; CoreText unifies the OT family /// as "Valkyrie OT" — only B members installed, no A/B ambiguity). static var bodyFont: NSFont { NSFont(name: "ValkyrieOTBRegular", size: 17) ?? NSFont.systemFont(ofSize: 17) } /// Headings = Concourse OT (the designer's own pairing with Valkyrie); /// Semibold carries heading weight better than Book on screen. static var headingFont: NSFont { NSFont(name: "ConcourseOT6Semibold", size: 26) ?? NSFont.systemFont(ofSize: 26, weight: .semibold) } /// Code slot (inline code, fenced blocks, editing syntax dim). static var codeFont: NSFont { NSFont(name: "UbuntuMonoNFM", size: 14) ?? NSFont.monospacedSystemFont(ofSize: 14, weight: .regular) } /// Editing-surface leading (blank source lines are the separator there). static let lineHeightMultiple: CGFloat = 1.5 static var italicBodyFont: NSFont { NSFontManager.shared.convert(bodyFont, toHaveTrait: .italicFontMask) } static var boldBodyFont: NSFont { NSFontManager.shared.convert(bodyFont, toHaveTrait: .boldFontMask) } // MARK: Attribute stacks (editing surface) static var foregroundColor: NSColor { NSColor(red: 0.10, green: 0.10, blue: 0.09, alpha: 1) } /// Dimmed syntax color (the editing surface's 0.5 dim, #19). static var syntaxColor: NSColor { NSColor(white: 0.55, alpha: 1) } static var quoteRuleColor: NSColor { NSColor(white: 0.78, alpha: 1) } /// Table borders + editing-surface hairline (≈ DesignTokens.border). static var tableBorderColor: NSColor { NSColor(red: 0xE8 / 255, green: 0xE5 / 255, blue: 0xDF / 255, alpha: 1) } static var bodyAttributes: [NSAttributedString.Key: Any] { [ .font: bodyFont, .paragraphStyle: ProsePresenter.paragraph(.body), .foregroundColor: foregroundColor, ] } static var codeAttributes: [NSAttributedString.Key: Any] { [ .font: codeFont, .foregroundColor: syntaxColor, ] } }