commit ded52209f59b91bf7f4e64aece1eb62c4dbe8e3b
parent d3e18ba6b41c466187461e9e96d49006c1b54e5f
Author: Marc Stibane <marc@taler.net>
Date: Tue, 10 Mar 2026 15:01:16 +0100
Hyperlegible for logo
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Helper/Font+Taler.swift b/TalerWallet1/Helper/Font+Taler.swift
@@ -9,7 +9,7 @@ import SwiftUI
// Use enums for multiple font types and functions for the set custom font.
-fileprivate let ATKINSON = "AtkinsonHyperlegible-"
+fileprivate let ATKINSON = "AtkinsonHyperlegibleNext-"
fileprivate let NUNITO = "Nunito-"
fileprivate let REGULAR = "Regular"
@@ -19,6 +19,15 @@ fileprivate let BOLDITALIC = "BoldItalic"
fileprivate let BLACK = "Black"
fileprivate let BLACKITALIC = "BlackItalic"
+public extension Font {
+ static func logo(_ size: CGFloat, weight: UIFont.Weight) -> Font {
+ let traits = [UIFontDescriptor.TraitKey.weight: weight] // regular, medium, semibold, bold
+ let fontDescriptor = UIFontDescriptor(fontAttributes: [UIFontDescriptor.AttributeName.family: "Atkinson Hyperlegible Next"])
+ let fontDescriptor2 = fontDescriptor.addingAttributes([UIFontDescriptor.AttributeName.traits: traits])
+ return Font(UIFont(descriptor: fontDescriptor2, size: size))
+ }
+}
+
extension UIFont {
/// scalable system font for style and weight (and italic)
/// https://stackoverflow.com/users/2145198/beebcon