Skip to content

Commit

Permalink
Merge pull request #31 from Nexters/feat/30-font-pretendard
Browse files Browse the repository at this point in the history
[feat][#30] font pretendard
  • Loading branch information
dayo2n authored Mar 4, 2024
2 parents 2ca1b36 + 09fc8b7 commit b611f16
Show file tree
Hide file tree
Showing 22 changed files with 157 additions and 30 deletions.
56 changes: 52 additions & 4 deletions DontForget.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@
AD6097C62B7CD9C3005060A6 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AD6097C52B7CD9C3005060A6 /* GoogleService-Info.plist */; };
AD76D0622B594A5000EFB12E /* UIScreen+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD76D0612B594A5000EFB12E /* UIScreen+Extension.swift */; };
AD76D0642B594D2F00EFB12E /* Color+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD76D0632B594D2F00EFB12E /* Color+Extension.swift */; };
AD7BEBBC2B91E93B00A03753 /* Pretendard-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB32B91E93A00A03753 /* Pretendard-Medium.otf */; };
AD7BEBBD2B91E93B00A03753 /* Pretendard-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB42B91E93A00A03753 /* Pretendard-Light.otf */; };
AD7BEBBE2B91E93B00A03753 /* Pretendard-Thin.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB52B91E93A00A03753 /* Pretendard-Thin.otf */; };
AD7BEBBF2B91E93B00A03753 /* Pretendard-ExtraBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB62B91E93A00A03753 /* Pretendard-ExtraBold.otf */; };
AD7BEBC02B91E93B00A03753 /* Pretendard-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB72B91E93A00A03753 /* Pretendard-SemiBold.otf */; };
AD7BEBC12B91E93B00A03753 /* Pretendard-Black.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB82B91E93B00A03753 /* Pretendard-Black.otf */; };
AD7BEBC22B91E93B00A03753 /* Pretendard-ExtraLight.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBB92B91E93B00A03753 /* Pretendard-ExtraLight.otf */; };
AD7BEBC32B91E93B00A03753 /* Pretendard-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBBA2B91E93B00A03753 /* Pretendard-Bold.otf */; };
AD7BEBC42B91E93B00A03753 /* Pretendard-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = AD7BEBBB2B91E93B00A03753 /* Pretendard-Regular.otf */; };
AD7BEBC62B91E97F00A03753 /* Font+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD7BEBC52B91E97F00A03753 /* Font+Extension.swift */; };
AD7D58602B75E7CB00832817 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = AD7D585F2B75E7CB00832817 /* Lottie */; };
AD7D58642B75E8F400832817 /* LottieView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD7D58632B75E8F400832817 /* LottieView.swift */; };
AD9320E32B600589009A9437 /* GridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD9320E22B600589009A9437 /* GridView.swift */; };
Expand Down Expand Up @@ -150,6 +160,16 @@
AD6097C52B7CD9C3005060A6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
AD76D0612B594A5000EFB12E /* UIScreen+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+Extension.swift"; sourceTree = "<group>"; };
AD76D0632B594D2F00EFB12E /* Color+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extension.swift"; sourceTree = "<group>"; };
AD7BEBB32B91E93A00A03753 /* Pretendard-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Medium.otf"; sourceTree = "<group>"; };
AD7BEBB42B91E93A00A03753 /* Pretendard-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Light.otf"; sourceTree = "<group>"; };
AD7BEBB52B91E93A00A03753 /* Pretendard-Thin.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Thin.otf"; sourceTree = "<group>"; };
AD7BEBB62B91E93A00A03753 /* Pretendard-ExtraBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraBold.otf"; sourceTree = "<group>"; };
AD7BEBB72B91E93A00A03753 /* Pretendard-SemiBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-SemiBold.otf"; sourceTree = "<group>"; };
AD7BEBB82B91E93B00A03753 /* Pretendard-Black.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Black.otf"; sourceTree = "<group>"; };
AD7BEBB92B91E93B00A03753 /* Pretendard-ExtraLight.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraLight.otf"; sourceTree = "<group>"; };
AD7BEBBA2B91E93B00A03753 /* Pretendard-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Bold.otf"; sourceTree = "<group>"; };
AD7BEBBB2B91E93B00A03753 /* Pretendard-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Regular.otf"; sourceTree = "<group>"; };
AD7BEBC52B91E97F00A03753 /* Font+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+Extension.swift"; sourceTree = "<group>"; };
AD7D58632B75E8F400832817 /* LottieView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LottieView.swift; sourceTree = "<group>"; };
AD9320E22B600589009A9437 /* GridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GridView.swift; sourceTree = "<group>"; };
ADA138422B58093E006F0219 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -384,6 +404,7 @@
AD147F102B57FAF900561846 /* Resources */ = {
isa = PBXGroup;
children = (
AD7BEBB22B91E92F00A03753 /* Pretendard */,
AD0417FC2B8F1D7800307944 /* splash_lottie.json */,
AD0418022B9056B300307944 /* main_card_lottie.json */,
AD147F022B57F85700561846 /* Assets.xcassets */,
Expand All @@ -399,6 +420,7 @@
09FD8FAA2B5FF1CF00EB83D8 /* Text+Extension.swift */,
AD76D0632B594D2F00EFB12E /* Color+Extension.swift */,
AD76D0612B594A5000EFB12E /* UIScreen+Extension.swift */,
AD7BEBC52B91E97F00A03753 /* Font+Extension.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -473,6 +495,22 @@
path = Detail;
sourceTree = "<group>";
};
AD7BEBB22B91E92F00A03753 /* Pretendard */ = {
isa = PBXGroup;
children = (
AD7BEBB82B91E93B00A03753 /* Pretendard-Black.otf */,
AD7BEBBA2B91E93B00A03753 /* Pretendard-Bold.otf */,
AD7BEBB62B91E93A00A03753 /* Pretendard-ExtraBold.otf */,
AD7BEBB92B91E93B00A03753 /* Pretendard-ExtraLight.otf */,
AD7BEBB42B91E93A00A03753 /* Pretendard-Light.otf */,
AD7BEBB32B91E93A00A03753 /* Pretendard-Medium.otf */,
AD7BEBBB2B91E93B00A03753 /* Pretendard-Regular.otf */,
AD7BEBB72B91E93A00A03753 /* Pretendard-SemiBold.otf */,
AD7BEBB52B91E93A00A03753 /* Pretendard-Thin.otf */,
);
path = Pretendard;
sourceTree = "<group>";
};
ADA138412B580925006F0219 /* Home */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -614,13 +652,22 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
AD7BEBC22B91E93B00A03753 /* Pretendard-ExtraLight.otf in Resources */,
AD7BEBC32B91E93B00A03753 /* Pretendard-Bold.otf in Resources */,
AD0418032B9056B300307944 /* main_card_lottie.json in Resources */,
AD7BEBBE2B91E93B00A03753 /* Pretendard-Thin.otf in Resources */,
AD147F0D2B57F89300561846 /* .swiftlint.yml in Resources */,
AD7BEBC42B91E93B00A03753 /* Pretendard-Regular.otf in Resources */,
AD7BEBC02B91E93B00A03753 /* Pretendard-SemiBold.otf in Resources */,
AD0417FD2B8F1D7900307944 /* splash_lottie.json in Resources */,
AD7BEBC12B91E93B00A03753 /* Pretendard-Black.otf in Resources */,
AD7BEBBC2B91E93B00A03753 /* Pretendard-Medium.otf in Resources */,
AD147F1A2B57FDA500561846 /* Localizable.strings in Resources */,
AD7BEBBF2B91E93B00A03753 /* Pretendard-ExtraBold.otf in Resources */,
AD147F062B57F85700561846 /* Preview Assets.xcassets in Resources */,
AD147F032B57F85700561846 /* Assets.xcassets in Resources */,
AD6097C62B7CD9C3005060A6 /* GoogleService-Info.plist in Resources */,
AD7BEBBD2B91E93B00A03753 /* Pretendard-Light.otf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -675,6 +722,7 @@
AD0F99352B7C526C00E2A915 /* MemoView.swift in Sources */,
ADAA246A2B63822E00363D04 /* SplashView.swift in Sources */,
ADA2CC0C2B6CD037001A38D9 /* Query.swift in Sources */,
AD7BEBC62B91E97F00A03753 /* Font+Extension.swift in Sources */,
09642C5E2B67CA6F0015220E /* CreationModel.swift in Sources */,
AD76D0642B594D2F00EFB12E /* Color+Extension.swift in Sources */,
ADAFFDD32B70C7FB00746D3E /* AnniversaryDetailViewModel.swift in Sources */,
Expand Down Expand Up @@ -892,7 +940,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
"OTHER_LDFLAGS[arch=*]" = "-Wl,-ld_classic";
PRODUCT_BUNDLE_IDENTIFIER = com.dazzling.DontForget;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -933,7 +981,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.dazzling.DontForget;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -966,7 +1014,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.dazzling.DontForget.DontForgetWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1001,7 +1049,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.dazzling.DontForget.DontForgetWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
12 changes: 12 additions & 0 deletions DontForget/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIAppFonts</key>
<array>
<string>Pretendard-Black.otf</string>
<string>Pretendard-Bold.otf</string>
<string>Pretendard-ExtraBold.otf</string>
<string>Pretendard-ExtraLight.otf</string>
<string>Pretendard-Light.otf</string>
<string>Pretendard-Medium.otf</string>
<string>Pretendard-Regular.otf</string>
<string>Pretendard-SemiBold.otf</string>
<string>Pretendard-Thin.otf</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
49 changes: 49 additions & 0 deletions DontForget/Sources/Extensions/Font+Extension.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// Font+Extension.swift
// DontForget
//
// Created by ์ œ๋‚˜ on 3/1/24.
//

import SwiftUI

extension Font {
enum Pretendard {
case black
case bold
case extraLight
case extraBold
case light
case medium
case regular
case semiBold
case thin

var value: String {
switch self {
case .black:
return "Pretendard-Black"
case .bold:
return "Pretendard-Bold"
case .extraLight:
return "Pretendard-ExtraLight"
case .extraBold:
return "Pretendard-ExtraBold"
case .light:
return "Pretendard-Light"
case .medium:
return "Pretendard-Medium"
case .regular:
return "Pretendard-Regular"
case .semiBold:
return "Pretendard-SemiBold"
case .thin:
return "Pretendard-Thin"
}
}
}

static func pretendard(_ type: Pretendard = .medium, size: CGFloat = 17) -> Font {
return .custom(type.value, size: size)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ struct ConfirmView: View {
.padding(.top, 32)
.padding(.bottom, 24)
Text(confirmTitle)
.font(.pretendard(.semiBold, size: 18))
.foregroundStyle(.white)
.padding(.bottom, 16)
Text(confirmDescription)
.multilineTextAlignment(.center)
.font(.system(size: 16))
.font(.pretendard(.regular, size: 16))
.foregroundStyle(Color.gray600)
.padding(.bottom, 28)

Expand All @@ -107,7 +108,7 @@ struct ConfirmView: View {
closeAction()
} label: {
Text("๋‹ซ๊ธฐ")
.font(.system(size: 16))
.font(.pretendard(size: 16))
.foregroundStyle(Color.gray600)
.padding(.trailing, 60)
.padding(.bottom, 5)
Expand All @@ -121,7 +122,7 @@ struct ConfirmView: View {
isConfirmToCancel ? cancelEditingAction() : deleteAnniversaryAction()
} label: {
Text(isConfirmToCancel ? "์ทจ์†Œ" : "์‚ญ์ œ")
.font(.system(size: 16))
.font(.pretendard(size: 16))
.foregroundStyle(isConfirmToCancel ? Color.primary500 : .red500)
.padding(.leading, 60)
.padding(.bottom, 5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ struct CreationView: View {
} label: {
Text("์ทจ์†Œ")
.foregroundColor(.gray600)
.font(.pretendard(.semiBold, size: 16))
}
.disabled(showConfirmView)
}
}
VStack {
Expand Down Expand Up @@ -174,6 +176,7 @@ struct CreationView: View {
}
} label: {
Text(focusField == .eventName ? "๋‹ค์Œ" : "์™„๋ฃŒ")
.font(.pretendard(.semiBold, size: 20))
.foregroundColor(.white)
.padding()
.frame(height: 72)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ struct AlarmView: View {

var body: some View {
VStack(alignment: .leading, spacing: 0) {
Text("๋ฏธ๋ฆฌ ์•Œ๋ฆผ")
.font(.system(size: 19, weight: .semibold))
Text("์•Œ๋ฆผ")
.font(.pretendard(.semiBold, size: 16))
.padding(.leading, 16)
.padding(.bottom, 32)
.foregroundColor(.white)
Expand All @@ -31,6 +31,7 @@ struct AlarmView: View {
.cornerRadius(50)
.overlay(
Text(alarmPeriod.title)
.font(.pretendard(size: 15))
.foregroundColor(selectedAlarmIndexes.contains(alarmPeriod.schedule) ? Color.white : Color.gray400)
)
.onTapGesture {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct CustomDatePicker: View {
.frame(width: 32)
Text("๋…„")
.foregroundColor(.gray)
.font(.pretendard(size: 15))
}

HStack(spacing: 10) {
Expand All @@ -45,7 +46,9 @@ struct CustomDatePicker: View {
proxy: $monthProxy
)
.frame(width: 32)
Text("์›”").foregroundColor(.gray)
Text("์›”")
.foregroundColor(.gray)
.font(.pretendard(size: 15))
}

HStack(spacing: 10) {
Expand All @@ -55,7 +58,9 @@ struct CustomDatePicker: View {
proxy: $dayProxy
)
.frame(width: 32)
Text("์ผ").foregroundColor(.gray)
Text("์ผ")
.foregroundColor(.gray)
.font(.pretendard(size: 15))
}
}
.onChange(of: selectedYear) { _, newValue in
Expand Down Expand Up @@ -85,6 +90,7 @@ struct CustomDatePicker: View {
ForEach(values, id: \.self) { value in
let displayValue = value % 100
Text("\(String(format: "%02d", displayValue))")
.font(.pretendard(size: 24))
.foregroundColor(selection.wrappedValue == value ? .blue : .gray)
.frame(width: 60, height: 63)
.id(value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ struct InputDateView: View {
Text.coloredText(
"๋‚ ์งœ *",
coloredPart: "*",
color: .pink
color: .pink500
)
.font(.system(size: 19, weight: .semibold))
.font(.pretendard(.semiBold, size: 16))
.padding(.leading, 16)
.padding(.bottom, 32)
.foregroundColor(.white)
Expand All @@ -35,7 +35,9 @@ struct InputDateView: View {
selection: $selectedSegment
) {
ForEach(0..<2) { index in
Text(segments[index]).tag(index)
Text(segments[index])
.tag(index)
.font(.pretendard(size: 15))
}
}
.disabled(isPickerDisabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ struct InputNameView: View {

var body: some View {
VStack(alignment: .leading, spacing: 0) {
Text.coloredText("๊ธฐ๋…์ผ ์ด๋ฆ„ *", coloredPart: "*", color: .pink)
.font(.system(size: 19, weight: .semibold))
Text.coloredText("๊ธฐ๋…์ผ ์ด๋ฆ„ *", coloredPart: "*", color: .pink500)
.font(.pretendard(.semiBold, size: 16))
.padding(.leading, 16)
.padding(.bottom, 32)
.foregroundColor(.white)
TextField(
"",
text: $name,
prompt: Text("์‚ฌ๋ž‘ํ•˜๋Š” ์—„๋งˆ์—๊ฒŒ").foregroundColor(.gray700)
prompt: Text("์‚ฌ๋ž‘ํ•˜๋Š” ์—„๋งˆ ์ƒ์ผ")
.foregroundColor(.gray700)
.font(.pretendard(size: 20))
)
.multilineTextAlignment(.center)
.padding(.horizontal, 20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ struct MemoView: View {
var body: some View {
VStack(alignment: .leading, spacing: 0) {
Text("๊ฐ„๋‹จ ๋ฉ”๋ชจ")
.font(.system(size: 19, weight: .semibold))
.font(.pretendard(.semiBold, size: 16))
.padding(.leading, 16)
.padding(.bottom, 32)
.foregroundColor(.white)
TextField(
"",
text: $memo,
prompt: Text("๊ฐ€์กฑ ์—ฌํ–‰ ๋ฏธ๋ฆฌ ๊ณ„ํšํ•˜๊ธฐ").foregroundColor(.gray700)
prompt: Text("๊ฐ€์กฑ ์—ฌํ–‰ ๋ฏธ๋ฆฌ ๊ณ„ํšํ•˜๊ธฐ")
.foregroundColor(.gray700)
.font(.pretendard(size: 20))
)
.multilineTextAlignment(.center)
.padding(.horizontal, 20)
Expand Down
Loading

0 comments on commit b611f16

Please sign in to comment.