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
|
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
|
/// - Parameter weight: Font weight name
|
||||||
/// - Returns: Multiplier for dot size (0.7 to 1.3)
|
/// - Returns: Multiplier for dot size (0.3 to 1.0) - much smaller for lighter weights
|
||||||
static func weightMultiplier(for weight: String) -> CGFloat {
|
static func dotSizeMultiplier(for weight: String) -> CGFloat {
|
||||||
switch weight {
|
switch weight {
|
||||||
case "Ultra Light":
|
case "Ultra Light":
|
||||||
return 0.7
|
return 0.3
|
||||||
case "Thin":
|
case "Thin":
|
||||||
return 0.75
|
return 0.35
|
||||||
case "Light":
|
case "Light":
|
||||||
return 0.8
|
return 0.4
|
||||||
case "Regular":
|
case "Regular":
|
||||||
return 0.85
|
return 0.5
|
||||||
case "Medium":
|
case "Medium":
|
||||||
return 0.9
|
return 0.6
|
||||||
case "Semibold":
|
case "Semibold":
|
||||||
return 1.0
|
return 0.7
|
||||||
case "Bold":
|
case "Bold":
|
||||||
return 1.1
|
return 0.8
|
||||||
case "Heavy":
|
case "Heavy":
|
||||||
return 1.2
|
return 0.9
|
||||||
case "Black":
|
case "Black":
|
||||||
return 1.3
|
|
||||||
default:
|
|
||||||
return 1.0
|
return 1.0
|
||||||
|
default:
|
||||||
|
return 0.7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -432,8 +432,9 @@ private struct DotCircle: View {
|
|||||||
let fontWeight: String
|
let fontWeight: String
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
let weightMultiplier = FontUtils.weightMultiplier(for: fontWeight)
|
// Calculate size based on font weight - make dots smaller for lighter weights
|
||||||
let adjustedSize = size * weightMultiplier
|
let sizeMultiplier = FontUtils.dotSizeMultiplier(for: fontWeight)
|
||||||
|
let adjustedSize = size * sizeMultiplier
|
||||||
|
|
||||||
ZStack {
|
ZStack {
|
||||||
Circle()
|
Circle()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user