Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
9cd84e1cac
commit
236f403e80
@ -244,31 +244,31 @@ enum FontUtils {
|
||||
return maxWidth
|
||||
}
|
||||
|
||||
/// Get weight multiplier for visual consistency with font weight
|
||||
/// Get dot size multiplier to match visual weight of font
|
||||
/// - Parameter weight: Font weight name
|
||||
/// - Returns: Multiplier for dot size (0.7 to 1.3)
|
||||
static func weightMultiplier(for weight: String) -> CGFloat {
|
||||
/// - Returns: Multiplier for dot size (0.3 to 1.0) - much smaller for lighter weights
|
||||
static func dotSizeMultiplier(for weight: String) -> CGFloat {
|
||||
switch weight {
|
||||
case "Ultra Light":
|
||||
return 0.7
|
||||
return 0.3
|
||||
case "Thin":
|
||||
return 0.75
|
||||
return 0.35
|
||||
case "Light":
|
||||
return 0.8
|
||||
return 0.4
|
||||
case "Regular":
|
||||
return 0.85
|
||||
return 0.5
|
||||
case "Medium":
|
||||
return 0.9
|
||||
return 0.6
|
||||
case "Semibold":
|
||||
return 1.0
|
||||
return 0.7
|
||||
case "Bold":
|
||||
return 1.1
|
||||
return 0.8
|
||||
case "Heavy":
|
||||
return 1.2
|
||||
return 0.9
|
||||
case "Black":
|
||||
return 1.3
|
||||
default:
|
||||
return 1.0
|
||||
default:
|
||||
return 0.7
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -432,8 +432,9 @@ private struct DotCircle: View {
|
||||
let fontWeight: String
|
||||
|
||||
var body: some View {
|
||||
let weightMultiplier = FontUtils.weightMultiplier(for: fontWeight)
|
||||
let adjustedSize = size * weightMultiplier
|
||||
// Calculate size based on font weight - make dots smaller for lighter weights
|
||||
let sizeMultiplier = FontUtils.dotSizeMultiplier(for: fontWeight)
|
||||
let adjustedSize = size * sizeMultiplier
|
||||
|
||||
ZStack {
|
||||
Circle()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user