From 4ba642242ed133fcb8c39aead06cc7a5e3f64a10 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 20 Jun 2023 14:25:39 -0500 Subject: [PATCH] refactored name Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 8 ++++---- VDS/Fonts/{Fonts.swift => Font.swift} | 2 +- VDS/Typography/Typography.swift | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename VDS/Fonts/{Fonts.swift => Font.swift} (93%) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index 65ecb9e6..1a7114bf 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -37,7 +37,7 @@ EA3362072891E14D0071C351 /* VerizonNHGeDS-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = EA3362032891E14D0071C351 /* VerizonNHGeDS-Regular.otf */; }; EA33622C2891E73B0071C351 /* FontProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33622B2891E73B0071C351 /* FontProtocol.swift */; }; EA33622E2891EA3C0071C351 /* DispatchQueue+Once.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33622D2891EA3C0071C351 /* DispatchQueue+Once.swift */; }; - EA3362302891EB4A0071C351 /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33622F2891EB4A0071C351 /* Fonts.swift */; }; + EA3362302891EB4A0071C351 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33622F2891EB4A0071C351 /* Font.swift */; }; EA33623E2892EE950071C351 /* UIDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33623D2892EE950071C351 /* UIDevice.swift */; }; EA3362402892EF6C0071C351 /* Label.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33623F2892EF6B0071C351 /* Label.swift */; }; EA33624728931B050071C351 /* Initable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA33624628931B050071C351 /* Initable.swift */; }; @@ -170,7 +170,7 @@ EA3362032891E14D0071C351 /* VerizonNHGeDS-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "VerizonNHGeDS-Regular.otf"; sourceTree = ""; }; EA33622B2891E73B0071C351 /* FontProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontProtocol.swift; sourceTree = ""; }; EA33622D2891EA3C0071C351 /* DispatchQueue+Once.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+Once.swift"; sourceTree = ""; }; - EA33622F2891EB4A0071C351 /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = ""; }; + EA33622F2891EB4A0071C351 /* Font.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Font.swift; sourceTree = ""; }; EA33623D2892EE950071C351 /* UIDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDevice.swift; sourceTree = ""; }; EA33623F2892EF6B0071C351 /* Label.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = ""; }; EA33624628931B050071C351 /* Initable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Initable.swift; sourceTree = ""; }; @@ -497,7 +497,7 @@ EA3361DF2891D0F10071C351 /* Fonts */ = { isa = PBXGroup; children = ( - EA33622F2891EB4A0071C351 /* Fonts.swift */, + EA33622F2891EB4A0071C351 /* Font.swift */, EA33622B2891E73B0071C351 /* FontProtocol.swift */, ); path = Fonts; @@ -945,7 +945,7 @@ EA33623E2892EE950071C351 /* UIDevice.swift in Sources */, EA985C692971B90B00F2FF2E /* IconSize.swift in Sources */, EA985C672970C21600F2FF2E /* VDSLayout.swift in Sources */, - EA3362302891EB4A0071C351 /* Fonts.swift in Sources */, + EA3362302891EB4A0071C351 /* Font.swift in Sources */, EAF7F0AD289B142900B287F5 /* StrikeThroughLabelAttribute.swift in Sources */, EAB5FEF12927F4AA00998C17 /* SelfSizingCollectionView.swift in Sources */, EA3361B8288B2AAA0071C351 /* ViewProtocol.swift in Sources */, diff --git a/VDS/Fonts/Fonts.swift b/VDS/Fonts/Font.swift similarity index 93% rename from VDS/Fonts/Fonts.swift rename to VDS/Fonts/Font.swift index 034e2b6f..57ad5962 100644 --- a/VDS/Fonts/Fonts.swift +++ b/VDS/Fonts/Font.swift @@ -7,7 +7,7 @@ import Foundation -public enum Fonts: String, FontProtocol { +public enum Font: String, FontProtocol { case dsBold case dsRegular case dsLight diff --git a/VDS/Typography/Typography.swift b/VDS/Typography/Typography.swift index 167f378e..a89b75de 100644 --- a/VDS/Typography/Typography.swift +++ b/VDS/Typography/Typography.swift @@ -28,7 +28,7 @@ public struct TextStyle: Equatable, RawRepresentable { public let pointSize: CGFloat public let lineHeight: CGFloat public let letterSpacing: CGFloat - public let fontFace: Fonts + public let fontFace: Font public init?(rawValue: String) { guard let style = TextStyle.textStyle(for: rawValue) else { return nil } @@ -39,7 +39,7 @@ public struct TextStyle: Equatable, RawRepresentable { self.fontFace = style.fontFace } - public init(rawValue: String, fontFace: Fonts, pointSize: CGFloat, lineHeight: CGFloat, letterSpacing: CGFloat) { + public init(rawValue: String, fontFace: Font, pointSize: CGFloat = 0.0, lineHeight: CGFloat = 0.0, letterSpacing: CGFloat = 0.0) { self.rawValue = rawValue self.fontFace = fontFace self.pointSize = pointSize