Skip to content

Commit

Permalink
feat: add getScaledCustomFont
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyingtao committed Oct 18, 2024
1 parent ed5520e commit 1db3ed6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/SwiftUIFontSettingsView/FontSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public struct FontSettings: Equatable {
}
}

public func getScaledCustomFont(by scale: CGFloat) -> Font {
Font.custom(customFontName, size: customFontSize * scale).width(fontWidth)
}

public init() {}

private mutating func setupCustomFont() {
Expand Down

0 comments on commit 1db3ed6

Please sign in to comment.