diff --git a/Source/DDS/Component/Button/Button/Button.swift b/Source/DDS/Component/Button/Button/Button.swift index 88508a2..29c7bed 100644 --- a/Source/DDS/Component/Button/Button/Button.swift +++ b/Source/DDS/Component/Button/Button/Button.swift @@ -234,7 +234,7 @@ private struct ButtonPreview: View { } } .padding() - .registerSUIT() + .registerPretendard() } } diff --git a/Source/DDS/Component/Button/SegmentedButton.swift b/Source/DDS/Component/Button/SegmentedButton.swift index e1fccef..bd6240a 100644 --- a/Source/DDS/Component/Button/SegmentedButton.swift +++ b/Source/DDS/Component/Button/SegmentedButton.swift @@ -82,7 +82,7 @@ private struct SegmentedButtonPreview: View { DodamSegmentedButton(labels: ["외출", "외박"], selection: .constant(0)) .padding(.horizontal, 16) } - .registerSUIT() + .registerPretendard() } } diff --git a/Source/DDS/Component/Button/TextButton/TextButton.swift b/Source/DDS/Component/Button/TextButton/TextButton.swift index 792585a..b3ebc9f 100644 --- a/Source/DDS/Component/Button/TextButton/TextButton.swift +++ b/Source/DDS/Component/Button/TextButton/TextButton.swift @@ -161,7 +161,7 @@ private struct ButtonPreview: View { } } .padding() - .registerSUIT() + .registerPretendard() } } diff --git a/Source/DDS/Component/CheckBox/Checkbox.swift b/Source/DDS/Component/CheckBox/Checkbox.swift index f7b755d..bbe3dfe 100644 --- a/Source/DDS/Component/CheckBox/Checkbox.swift +++ b/Source/DDS/Component/CheckBox/Checkbox.swift @@ -68,7 +68,7 @@ public struct DodamCheckbox: View { } .padding(16) .background(DodamColor.Background.normal) - .registerSUIT() + .registerPretendard() } } return CheckboxPreview() diff --git a/Source/DDS/Component/EmptyView/EmptyView.swift b/Source/DDS/Component/EmptyView/EmptyView.swift index 38eabbd..6500dbe 100644 --- a/Source/DDS/Component/EmptyView/EmptyView.swift +++ b/Source/DDS/Component/EmptyView/EmptyView.swift @@ -52,7 +52,7 @@ private struct DodamContainerPreview: View { } .padding(16) .background(DodamColor.Background.neutral) - .registerSUIT() + .registerPretendard() } } diff --git a/Source/DDS/Component/LoadingView/LoadingView.swift b/Source/DDS/Component/LoadingView/LoadingView.swift index a75a9dd..5b111a1 100644 --- a/Source/DDS/Component/LoadingView/LoadingView.swift +++ b/Source/DDS/Component/LoadingView/LoadingView.swift @@ -33,5 +33,5 @@ public struct DodamLoadingView: View { #Preview { DodamLoadingView() - .registerSUIT() + .registerPretendard() } diff --git a/Source/DDS/Component/Modal/Dialog/DodamDialogPresenter.swift b/Source/DDS/Component/Modal/Dialog/DodamDialogPresenter.swift index acae0e4..74a9abb 100644 --- a/Source/DDS/Component/Modal/Dialog/DodamDialogPresenter.swift +++ b/Source/DDS/Component/Modal/Dialog/DodamDialogPresenter.swift @@ -109,7 +109,7 @@ public struct DodamDialogPresenter: ModalViewProtocol { } } } - .registerSUIT() + .registerPretendard() } } return DialogPreview() diff --git a/Source/DDS/Component/NavigationView/NavigationView.swift b/Source/DDS/Component/NavigationView/NavigationView.swift index 036ddf9..95b7dce 100644 --- a/Source/DDS/Component/NavigationView/NavigationView.swift +++ b/Source/DDS/Component/NavigationView/NavigationView.swift @@ -38,5 +38,5 @@ public struct DodamNavigationView: DodamNavigationViewProtocol { } .button(icon: .plus) { } .button(icon: .bell) { } - .registerSUIT() + .registerPretendard() } diff --git a/Source/DDS/Component/PageView/PageView.swift b/Source/DDS/Component/PageView/PageView.swift index 37b9a31..728b91d 100644 --- a/Source/DDS/Component/PageView/PageView.swift +++ b/Source/DDS/Component/PageView/PageView.swift @@ -71,7 +71,7 @@ public struct DodamPageView: View { } .frame(height: 50) .padding() - .registerSUIT() + .registerPretendard() } } return DodamPagePreview() diff --git a/Source/DDS/Component/ProgressIndicator/CircularProgressView.swift b/Source/DDS/Component/ProgressIndicator/CircularProgressView.swift index 02064e2..34c7307 100644 --- a/Source/DDS/Component/ProgressIndicator/CircularProgressView.swift +++ b/Source/DDS/Component/ProgressIndicator/CircularProgressView.swift @@ -83,7 +83,7 @@ public struct DodamCircularProgressView: View { .tint(.gray) } .padding() - .registerSUIT() + .registerPretendard() } } return DodamCircularProgressPreview() diff --git a/Source/DDS/Component/ProgressIndicator/LinearProgressView.swift b/Source/DDS/Component/ProgressIndicator/LinearProgressView.swift index b4ed70f..7739036 100644 --- a/Source/DDS/Component/ProgressIndicator/LinearProgressView.swift +++ b/Source/DDS/Component/ProgressIndicator/LinearProgressView.swift @@ -62,7 +62,7 @@ public struct DodamLinearProgressView: View { .tint(.gray) } .padding() - .registerSUIT() + .registerPretendard() } } return DodamLinearProgressPreview() diff --git a/Source/DDS/Component/ScrollView/ScrollView.swift b/Source/DDS/Component/ScrollView/ScrollView.swift index 16f7d9f..ebc5d8f 100644 --- a/Source/DDS/Component/ScrollView/ScrollView.swift +++ b/Source/DDS/Component/ScrollView/ScrollView.swift @@ -97,5 +97,5 @@ public struct DodamScrollView: DodamNavigationViewProtocol { } .button(icon: .plus) { } .button(icon: .bell) { } - .registerSUIT() + .registerPretendard() } diff --git a/Source/DDS/Component/Sheet/Sheet.swift b/Source/DDS/Component/Sheet/Sheet.swift index 4aa5837..971bdce 100644 --- a/Source/DDS/Component/Sheet/Sheet.swift +++ b/Source/DDS/Component/Sheet/Sheet.swift @@ -103,7 +103,7 @@ public struct DodamSheet: View { .dodamSheet(isPresented: $isPresented) { Text("Presented") } - .registerSUIT() + .registerPretendard() } } return DodamSheetPreview() @@ -128,7 +128,7 @@ public struct DodamSheet: View { DatePicker("", selection: $date) .datePickerStyle(.wheel) } - .registerSUIT() + .registerPretendard() } } return DodamSheetPreview() diff --git a/Source/DDS/Component/Shimmer/Shimmer.swift b/Source/DDS/Component/Shimmer/Shimmer.swift index 7c6cdda..3f271f8 100644 --- a/Source/DDS/Component/Shimmer/Shimmer.swift +++ b/Source/DDS/Component/Shimmer/Shimmer.swift @@ -45,5 +45,5 @@ public struct DodamShimmer: View { .frame(width: 100, height: 100) } .shimmer() - .registerSUIT() + .registerPretendard() } diff --git a/Source/DDS/Component/TabView/TabView.swift b/Source/DDS/Component/TabView/TabView.swift index 01d9920..1ff4d2d 100644 --- a/Source/DDS/Component/TabView/TabView.swift +++ b/Source/DDS/Component/TabView/TabView.swift @@ -128,7 +128,7 @@ private struct DodamPagePreview: View { Text("Menu") .page(.icon(.menu)) } - .registerSUIT() + .registerPretendard() .background(DodamColor.Background.neutral) } } diff --git a/Source/DDS/Component/Tag/Tag.swift b/Source/DDS/Component/Tag/Tag.swift index 9609fcd..3a38884 100644 --- a/Source/DDS/Component/Tag/Tag.swift +++ b/Source/DDS/Component/Tag/Tag.swift @@ -48,7 +48,7 @@ public struct DodamTag: View { private struct TagPreview: View { init() { - SUIT.register() + Pretendard.register() } var body: some View { diff --git a/Source/DDS/Component/TextField/TextField.swift b/Source/DDS/Component/TextField/TextField.swift index 9fc2678..d717d5e 100644 --- a/Source/DDS/Component/TextField/TextField.swift +++ b/Source/DDS/Component/TextField/TextField.swift @@ -125,7 +125,7 @@ public struct DodamTextField: View { ) } .padding() - .registerSUIT() + .registerPretendard() } } return DodamTextFieldPreview() diff --git a/Source/DDS/Component/Toast/Toast.swift b/Source/DDS/Component/Toast/Toast.swift index 144d274..86fbea7 100644 --- a/Source/DDS/Component/Toast/Toast.swift +++ b/Source/DDS/Component/Toast/Toast.swift @@ -86,7 +86,7 @@ public struct DodamToast: View { ) { Text("Hello, world!") } - .registerSUIT() + .registerPretendard() } } return DodamToastPreview() diff --git a/Source/DDS/Component/TopAppBar/TopAppBar.swift b/Source/DDS/Component/TopAppBar/TopAppBar.swift index 665fd37..c4aeaf4 100644 --- a/Source/DDS/Component/TopAppBar/TopAppBar.swift +++ b/Source/DDS/Component/TopAppBar/TopAppBar.swift @@ -193,5 +193,5 @@ public struct DodamTopAppBar: View { .button(icon: .bell) { } Divider() } - .registerSUIT() + .registerPretendard() } diff --git a/Source/DDS/Component/TopTabView/TopTabView.swift b/Source/DDS/Component/TopTabView/TopTabView.swift index 99e0378..1c24a46 100644 --- a/Source/DDS/Component/TopTabView/TopTabView.swift +++ b/Source/DDS/Component/TopTabView/TopTabView.swift @@ -88,7 +88,7 @@ private struct DodamTopTabPreview: View { Text("MY") .page(.text("MY")) } - .registerSUIT() + .registerPretendard() } } diff --git a/Source/DDS/Foundation/Typography/Extension/FontExt.swift b/Source/DDS/Foundation/Typography/Extension/FontExt.swift index cffd787..729836c 100644 --- a/Source/DDS/Foundation/Typography/Extension/FontExt.swift +++ b/Source/DDS/Foundation/Typography/Extension/FontExt.swift @@ -4,13 +4,13 @@ import SwiftUI public extension Font { init(_ dodamTypography: DodamTypography) { - self = .suit( + self = .pretendard( size: dodamTypography.size, weight: dodamTypography.weight ) } - static func suit(size: CGFloat, weight: SUIT.Weight) -> Font { + static func pretendard(size: CGFloat, weight: Pretendard.Weight) -> Font { custom(weight.rawValue, fixedSize: size) } diff --git a/Source/DDS/Foundation/Typography/Extension/SUIT.swift b/Source/DDS/Foundation/Typography/Extension/Pretendard.swift similarity index 66% rename from Source/DDS/Foundation/Typography/Extension/SUIT.swift rename to Source/DDS/Foundation/Typography/Extension/Pretendard.swift index 804e173..8d6a96c 100644 --- a/Source/DDS/Foundation/Typography/Extension/SUIT.swift +++ b/Source/DDS/Foundation/Typography/Extension/Pretendard.swift @@ -1,19 +1,19 @@ import SwiftUI @available(macOS 12, iOS 15, *) -public struct SUIT { +public struct Pretendard { public enum Weight: String, CaseIterable { - case regular = "SUIT-Regular" - case medium = "SUIT-Medium" - case semibold = "SUIT-SemiBold" - case bold = "SUIT-Bold" - case extrabold = "SUIT-ExtraBold" + case regular = "Pretendard-Regular" + case medium = "Pretendard-Medium" + case semibold = "Pretendard-SemiBold" + case bold = "Pretendard-Bold" + case extrabold = "Pretendard-ExtraBold" } public static func register() { - SUIT.Weight.allCases.forEach { + Pretendard.Weight.allCases.forEach { guard let fontURL = Bundle.module.url( forResource: $0.rawValue, withExtension: "otf" diff --git a/Source/DDS/Foundation/Typography/Extension/ViewExt.swift b/Source/DDS/Foundation/Typography/Extension/ViewExt.swift index cf94b07..e7bb93a 100644 --- a/Source/DDS/Foundation/Typography/Extension/ViewExt.swift +++ b/Source/DDS/Foundation/Typography/Extension/ViewExt.swift @@ -3,8 +3,8 @@ import SwiftUI @available(macOS 12, iOS 15, *) public extension View { - func registerSUIT() -> some View { - SUIT.register() + func registerPretendard() -> some View { + Pretendard.register() return self } } @@ -81,7 +81,7 @@ public extension View { #Preview { let str = "스마트 스쿨 플랫폼 도담도담도담\n바인드는 우주 최강 동아리입니다" - SUIT.register() + Pretendard.register() return ( ScrollView { VStack(spacing: 44) { @@ -191,7 +191,7 @@ public extension View { #Preview { VStack { - let _ = SUIT.register() + let _ = Pretendard.register() let headline = DodamHeadline(weight: .bold) let font = Font(headline) let uiFont = UIFont.uiFontGuide(headline) diff --git a/Source/DDS/Foundation/Typography/Font/Pretendard-Bold.otf b/Source/DDS/Foundation/Typography/Font/Pretendard-Bold.otf new file mode 100644 index 0000000..8e5e30a Binary files /dev/null and b/Source/DDS/Foundation/Typography/Font/Pretendard-Bold.otf differ diff --git a/Source/DDS/Foundation/Typography/Font/Pretendard-ExtraBold.otf b/Source/DDS/Foundation/Typography/Font/Pretendard-ExtraBold.otf new file mode 100644 index 0000000..388f3ca Binary files /dev/null and b/Source/DDS/Foundation/Typography/Font/Pretendard-ExtraBold.otf differ diff --git a/Source/DDS/Foundation/Typography/Font/Pretendard-Medium.otf b/Source/DDS/Foundation/Typography/Font/Pretendard-Medium.otf new file mode 100644 index 0000000..0575069 Binary files /dev/null and b/Source/DDS/Foundation/Typography/Font/Pretendard-Medium.otf differ diff --git a/Source/DDS/Foundation/Typography/Font/Pretendard-Regular.otf b/Source/DDS/Foundation/Typography/Font/Pretendard-Regular.otf new file mode 100644 index 0000000..08bf4cf Binary files /dev/null and b/Source/DDS/Foundation/Typography/Font/Pretendard-Regular.otf differ diff --git a/Source/DDS/Foundation/Typography/Font/Pretendard-SemiBold.otf b/Source/DDS/Foundation/Typography/Font/Pretendard-SemiBold.otf new file mode 100644 index 0000000..e7e36ab Binary files /dev/null and b/Source/DDS/Foundation/Typography/Font/Pretendard-SemiBold.otf differ diff --git a/Source/DDS/Foundation/Typography/Font/SUIT-Bold.otf b/Source/DDS/Foundation/Typography/Font/SUIT-Bold.otf deleted file mode 100644 index fcd4b3a..0000000 Binary files a/Source/DDS/Foundation/Typography/Font/SUIT-Bold.otf and /dev/null differ diff --git a/Source/DDS/Foundation/Typography/Font/SUIT-ExtraBold.otf b/Source/DDS/Foundation/Typography/Font/SUIT-ExtraBold.otf deleted file mode 100644 index aaedc33..0000000 Binary files a/Source/DDS/Foundation/Typography/Font/SUIT-ExtraBold.otf and /dev/null differ diff --git a/Source/DDS/Foundation/Typography/Font/SUIT-Medium.otf b/Source/DDS/Foundation/Typography/Font/SUIT-Medium.otf deleted file mode 100644 index 0f9d590..0000000 Binary files a/Source/DDS/Foundation/Typography/Font/SUIT-Medium.otf and /dev/null differ diff --git a/Source/DDS/Foundation/Typography/Font/SUIT-Regular.otf b/Source/DDS/Foundation/Typography/Font/SUIT-Regular.otf deleted file mode 100644 index 2cd3921..0000000 Binary files a/Source/DDS/Foundation/Typography/Font/SUIT-Regular.otf and /dev/null differ diff --git a/Source/DDS/Foundation/Typography/Font/SUIT-SemiBold.otf b/Source/DDS/Foundation/Typography/Font/SUIT-SemiBold.otf deleted file mode 100644 index c89c895..0000000 Binary files a/Source/DDS/Foundation/Typography/Font/SUIT-SemiBold.otf and /dev/null differ diff --git a/Source/DDS/Foundation/Typography/Type/Body1.swift b/Source/DDS/Foundation/Typography/Type/Body1.swift index 27f53e1..7b276e8 100644 --- a/Source/DDS/Foundation/Typography/Type/Body1.swift +++ b/Source/DDS/Foundation/Typography/Type/Body1.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamBody1: DodamTypography { public let size: CGFloat = 16 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.5 public static let bold: Self = .init(weight: .semibold) diff --git a/Source/DDS/Foundation/Typography/Type/Body2.swift b/Source/DDS/Foundation/Typography/Type/Body2.swift index ab19b32..993032d 100644 --- a/Source/DDS/Foundation/Typography/Type/Body2.swift +++ b/Source/DDS/Foundation/Typography/Type/Body2.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamBody2: DodamTypography { public let size: CGFloat = 15 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.5 public static let bold: Self = .init(weight: .semibold) diff --git a/Source/DDS/Foundation/Typography/Type/Caption1.swift b/Source/DDS/Foundation/Typography/Type/Caption1.swift index 3bd0368..c9fc09f 100644 --- a/Source/DDS/Foundation/Typography/Type/Caption1.swift +++ b/Source/DDS/Foundation/Typography/Type/Caption1.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamCaption1: DodamTypography { public let size: CGFloat = 13 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.3 public static let bold: Self = .init(weight: .semibold) diff --git a/Source/DDS/Foundation/Typography/Type/Caption2.swift b/Source/DDS/Foundation/Typography/Type/Caption2.swift index af60bc0..5a93130 100644 --- a/Source/DDS/Foundation/Typography/Type/Caption2.swift +++ b/Source/DDS/Foundation/Typography/Type/Caption2.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamCaption2: DodamTypography { public let size: CGFloat = 12 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.3 public static let bold: Self = .init(weight: .semibold) diff --git a/Source/DDS/Foundation/Typography/Type/Heading1.swift b/Source/DDS/Foundation/Typography/Type/Heading1.swift index 597a233..23fd275 100644 --- a/Source/DDS/Foundation/Typography/Type/Heading1.swift +++ b/Source/DDS/Foundation/Typography/Type/Heading1.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamHeading1: DodamTypography { public let size: CGFloat = 22 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.3 public static let bold: Self = .init(weight: .extrabold) diff --git a/Source/DDS/Foundation/Typography/Type/Heading2.swift b/Source/DDS/Foundation/Typography/Type/Heading2.swift index 15ad645..32cc71c 100644 --- a/Source/DDS/Foundation/Typography/Type/Heading2.swift +++ b/Source/DDS/Foundation/Typography/Type/Heading2.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamHeading2: DodamTypography { public let size: CGFloat = 20 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.4 public static let bold: Self = .init(weight: .extrabold) diff --git a/Source/DDS/Foundation/Typography/Type/Headline.swift b/Source/DDS/Foundation/Typography/Type/Headline.swift index 1068704..63fc959 100644 --- a/Source/DDS/Foundation/Typography/Type/Headline.swift +++ b/Source/DDS/Foundation/Typography/Type/Headline.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamHeadline: DodamTypography { public let size: CGFloat = 18 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.5 public static let bold: Self = .init(weight: .bold) diff --git a/Source/DDS/Foundation/Typography/Type/Label.swift b/Source/DDS/Foundation/Typography/Type/Label.swift index 91bbe65..66dce3f 100644 --- a/Source/DDS/Foundation/Typography/Type/Label.swift +++ b/Source/DDS/Foundation/Typography/Type/Label.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamLabel: DodamTypography { public let size: CGFloat = 14 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.4 public static let bold: Self = .init(weight: .semibold) diff --git a/Source/DDS/Foundation/Typography/Type/Title1.swift b/Source/DDS/Foundation/Typography/Type/Title1.swift index 26e590c..780cedc 100644 --- a/Source/DDS/Foundation/Typography/Type/Title1.swift +++ b/Source/DDS/Foundation/Typography/Type/Title1.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamTitle1: DodamTypography { public let size: CGFloat = 36 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.3 public static let bold: Self = .init(weight: .extrabold) diff --git a/Source/DDS/Foundation/Typography/Type/Title2.swift b/Source/DDS/Foundation/Typography/Type/Title2.swift index f04d7aa..11a9b4e 100644 --- a/Source/DDS/Foundation/Typography/Type/Title2.swift +++ b/Source/DDS/Foundation/Typography/Type/Title2.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamTitle2: DodamTypography { public let size: CGFloat = 28 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.3 public static let bold: Self = .init(weight: .extrabold) diff --git a/Source/DDS/Foundation/Typography/Type/Title3.swift b/Source/DDS/Foundation/Typography/Type/Title3.swift index 29537a2..e085e1a 100644 --- a/Source/DDS/Foundation/Typography/Type/Title3.swift +++ b/Source/DDS/Foundation/Typography/Type/Title3.swift @@ -4,7 +4,7 @@ import SwiftUI public struct DodamTitle3: DodamTypography { public let size: CGFloat = 24 - public let weight: SUIT.Weight + public let weight: Pretendard.Weight public let lineHeight: Double = 1.3 public static let bold: Self = .init(weight: .extrabold) diff --git a/Source/DDS/Foundation/Typography/Typography.swift b/Source/DDS/Foundation/Typography/Typography.swift index dfbe220..98e5efb 100644 --- a/Source/DDS/Foundation/Typography/Typography.swift +++ b/Source/DDS/Foundation/Typography/Typography.swift @@ -4,7 +4,7 @@ import SwiftUI public protocol DodamTypography { var size: CGFloat { get } - var weight: SUIT.Weight { get } + var weight: Pretendard.Weight { get } var lineHeight: Double { get } // percentage }