//
//  SplashTypography.swift
//  suixinkan
//
//  Created by Codex on 2026/6/30.
//

import SwiftUI
import UIKit

/// 启动页字体规范，供 `SplashView` 与 `Launch Screen.storyboard` 对齐。
enum SplashTypography {
    /// 标题字号（「随心瞰」）
    static let titlePointSize: CGFloat = 40
    /// 副标题字号（「商家版」）
    static let subtitlePointSize: CGFloat = 20

    /// 启动页标题 UIKit 字体：40pt system bold + italic。
    static var titleUIFont: UIFont {
        let base = UIFont.systemFont(ofSize: titlePointSize, weight: .bold)
        guard let descriptor = base.fontDescriptor.withSymbolicTraits([.traitBold, .traitItalic]) else {
            return base
        }
        return UIFont(descriptor: descriptor, size: titlePointSize)
    }

    /// 启动页副标题 UIKit 字体：20pt system bold。
    static var subtitleUIFont: UIFont {
        UIFont.systemFont(ofSize: subtitlePointSize, weight: .bold)
    }

    /// 启动页标题 SwiftUI 字体。
    static var titleFont: Font { Font(titleUIFont) }

    /// 启动页副标题 SwiftUI 字体。
    static var subtitleFont: Font { Font(subtitleUIFont) }
}
