diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 17:06:28 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-04 17:06:28 +0200 |
| commit | c843d34f56c207abcf4b93e424125eea2dc601e0 (patch) | |
| tree | 415dc2d9be4be31e290e1dd1dedb0b630c5e8fc6 /Map/Presentation/Theme/Font+theme.swift | |
| parent | ed10ac191df473c92c4fec495aafa7f569d108c8 (diff) | |
Upgrade to Swift 6
Diffstat (limited to 'Map/Presentation/Theme/Font+theme.swift')
| -rw-r--r-- | Map/Presentation/Theme/Font+theme.swift | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/Map/Presentation/Theme/Font+theme.swift b/Map/Presentation/Theme/Font+theme.swift index 1a9abb8..2fb56f7 100644 --- a/Map/Presentation/Theme/Font+theme.swift +++ b/Map/Presentation/Theme/Font+theme.swift @@ -15,6 +15,19 @@ import SwiftUI extension Font { + + static func libertinus(size: CGFloat) -> Font { + return .custom("Libertinus Serif", size: size) + } + + static func ronzino(size: CGFloat) -> Font { + return .custom("Ronzino", size: size) + } + + static func ronzinoMedium(size: CGFloat) -> Font { + return .custom("RonzinoMedium", size: size) + } + public struct Theme { // Map @@ -22,8 +35,30 @@ extension Font { static let axisLabel = Font.system(size: 14, design: .serif) static let vertexLabel = Font.system(size: 12, design: .serif) - // UI - static let smallControl = Font.system(size: 9) - static let body = Font.system(size: 13) + struct Body { + static let regular = Font.ronzino(size: Dimensions.FontSize.body).weight(.regular) + static let emphasized = Font.ronzino(size: Dimensions.FontSize.body).weight(.medium) + } + + struct Title { + static let emphasized = Font.libertinus(size: Dimensions.FontSize.title).weight(.medium) + } + + struct Caption { + static let regular = Font.ronzino(size: Dimensions.FontSize.caption).weight(.regular) + static let emphasized = Font.ronzino(size: Dimensions.FontSize.caption).weight(.medium) + } + + struct SmallControl { + static let regular = Font.ronzino(size: Dimensions.FontSize.smallControl).weight(.regular) + } + + struct Map { + static let note = Font.libertinus(size: Dimensions.FontSize.Map.note).weight(.regular) + static let axisLabel = Font.libertinus(size: Dimensions.FontSize.Map.axisLabel).weight( + .regular) + static let vertexLabel = Font.libertinus(size: Dimensions.FontSize.Map.vertexLabel).weight( + .regular) + } } } |