앱 언어 설정이 한국어("ko")이면 Pretendard 폰트 그 외에는 시스템 폰트하는 FontModifier 추가
This commit is contained in:
@@ -12,7 +12,7 @@ struct TabButton: View {
|
||||
let title: LocalizedStringResource
|
||||
let action: () -> Void
|
||||
let image: () -> String
|
||||
let fontName: () -> String
|
||||
let fontWeight: () -> SwiftUI.Font.Weight
|
||||
let color: () -> Color
|
||||
let width: CGFloat
|
||||
|
||||
@@ -21,7 +21,7 @@ struct TabButton: View {
|
||||
Image(image())
|
||||
|
||||
Text(title)
|
||||
.font(.custom(fontName(), size: 10))
|
||||
.appFont(size: 10, weight: fontWeight())
|
||||
.foregroundColor(color())
|
||||
}
|
||||
.frame(width: width)
|
||||
@@ -37,7 +37,7 @@ struct TabButton_Previews: PreviewProvider {
|
||||
title: "라이브",
|
||||
action: {},
|
||||
image: { "ic_tabbar_live_selected" },
|
||||
fontName: { Font.bold.rawValue },
|
||||
fontWeight: { .bold },
|
||||
color: { Color(hex: "3bb9f1") },
|
||||
width: UIScreen.main.bounds.width / 4
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user