diff --git a/FontUtility.swift b/FontUtility.swift deleted file mode 100644 index 0477927..0000000 --- a/FontUtility.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// FontUtility.swift -// Kabinett -// -// Created by Song Kim on 10/24/24. -// - -import Foundation -import UIKit -import SwiftUI - -class FontUtility { - static let screenSize = UIScreen.main.bounds.width - - static func selectedUIFont(font: String, size: CGFloat) -> UIFont { - if font == "SFMONO" { - return UIFont.monospacedSystemFont(ofSize: size, weight: .regular) - } else if font == "SFDisplay" { - return UIFont.systemFont(ofSize: size) - } else { - return UIFont(name: font, size: size) ?? UIFont.systemFont(ofSize: size) - } - } - - static func selectedFont(font: String, size: CGFloat) -> Font { - if font == "SFMONO" { - return .system(size: size, design: .monospaced) - } else if font == "SFDisplay" { - return .system(size: size) - } else { - return .custom(font, size: size) - } - } - - static func fontSize(font: String) -> CGFloat { - if font == "SourceHanSerifK-Regular" { - return screenSize * 0.0333 - } else if font == "NanumMyeongjoOTF" { - return screenSize * 0.0392 - } else if font == "Baskervville-Regular" { - return screenSize * 0.0369 - } else if font == "Pecita" { - return screenSize * 0.037 - } - return (screenSize * 0.0382) - } - - static func lineSpacing(font: String) -> CGFloat { - if font == "Pecita" { - return screenSize * 0.0069 - } else if font == "SFDisplay" { - return screenSize * 0.0013 - } else if font == "goormSansOTF4" { - return screenSize * 0.0013 - } else if font == "Baskervville-Regular" { - return screenSize * 0.002 - } - return 0.0 - } - - static func kerning(font: String) -> CGFloat { - if font == "SFMONO" { - return -(screenSize * 0.0025) - } else if font == "SFDisplay" { - return (screenSize * 0.0005) - } else if font == "goormSansOTF4" { - return (screenSize * 0.001) - } - return 0.0 - } -} diff --git a/Kabinett.xcodeproj/project.pbxproj b/Kabinett.xcodeproj/project.pbxproj index ce76a1d..180f1aa 100644 --- a/Kabinett.xcodeproj/project.pbxproj +++ b/Kabinett.xcodeproj/project.pbxproj @@ -209,7 +209,7 @@ 579E35FC2D2BB0FA00F92A87 /* EnvelopeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvelopeCell.swift; sourceTree = ""; }; 579E35FE2D2BB11400F92A87 /* StampCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StampCell.swift; sourceTree = ""; }; 57A014FD2CA57E7100580883 /* NanumMyeongjo.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = NanumMyeongjo.otf; sourceTree = ""; }; - 57C35C662CCA02130083A346 /* FontUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FontUtility.swift; path = ../../../../FontUtility.swift; sourceTree = ""; }; + 57C35C662CCA02130083A346 /* FontUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontUtility.swift; sourceTree = ""; }; 57EBE5AF2C69E5F2003ECD7F /* UserSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSelectionView.swift; sourceTree = ""; }; 57EBE5B82C6B399C003ECD7F /* StationerySelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StationerySelectionView.swift; sourceTree = ""; }; 57ED94F92C84AFAC00A6F187 /* LetterWriteModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LetterWriteModel.swift; path = Kabinett/Presentation/ViewModel/WriteLetter/LetterWriteModel.swift; sourceTree = SOURCE_ROOT; }; diff --git a/Kabinett/Presentation/ViewModel/WriteLetter/FontUtility.swift b/Kabinett/Presentation/ViewModel/WriteLetter/FontUtility.swift index cc40892..0477927 100644 --- a/Kabinett/Presentation/ViewModel/WriteLetter/FontUtility.swift +++ b/Kabinett/Presentation/ViewModel/WriteLetter/FontUtility.swift @@ -2,12 +2,12 @@ // FontUtility.swift // Kabinett // -// Created by Song Kim on 10/17/24. +// Created by Song Kim on 10/24/24. // import Foundation -import SwiftUI import UIKit +import SwiftUI class FontUtility { static let screenSize = UIScreen.main.bounds.width diff --git a/NanumMyeongjo.otf b/NanumMyeongjo.otf deleted file mode 100644 index b9d1000..0000000 Binary files a/NanumMyeongjo.otf and /dev/null differ