-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
16 deletions.
There are no files selected for viewing
15 changes: 7 additions & 8 deletions
15
Projects/UserInterface/DesignSystem/Sources/Font/Font+Ondosee.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
// | ||
// Font+Ondosee.swift | ||
// DesignSystem | ||
// | ||
// Created by 정윤서 on 8/28/24. | ||
// Copyright © 2024 com. All rights reserved. | ||
// | ||
import SwiftUI | ||
|
||
import Foundation | ||
public extension Font { | ||
enum OndoseeFontSystem { | ||
case system | ||
case freesentation | ||
} | ||
} |
31 changes: 23 additions & 8 deletions
31
Projects/UserInterface/DesignSystem/Sources/Font/FontWeight+Ext.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
// | ||
// FontWeight+Ext.swift | ||
// DesignSystem | ||
// | ||
// Created by 정윤서 on 8/27/24. | ||
// Copyright © 2024 com. All rights reserved. | ||
// | ||
import SwiftUI | ||
|
||
import Foundation | ||
public extension Font { | ||
static func regular(_ style: Font.OndoseeFontSystem, size: CGFloat.OndoseeFontStyle) -> Font { | ||
switch style { | ||
case .system: return .system(size: size.size, weight: .regular) | ||
case .freesentation: return DesignSystemFontFamily.Freesentation._4Regular.swiftUIFont(size: size.size) | ||
} | ||
} | ||
|
||
static func medium(_ style: Font.OndoseeFontSystem, size: CGFloat.OndoseeFontStyle) -> Font { | ||
switch style { | ||
case .system: return .system(size: size.size, weight: .medium) | ||
case .freesentation: return DesignSystemFontFamily.Freesentation._5Medium.swiftUIFont(size: size.size) | ||
} | ||
} | ||
|
||
static func bold(_ style: Font.OndoseeFontSystem, size: CGFloat.OndoseeFontStyle) -> Font { | ||
switch style { | ||
case .system: return .system(size: size.size, weight: .bold) | ||
case .freesentation: return DesignSystemFontFamily.Freesentation._7Bold.swiftUIFont(size: size.size) | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
Projects/UserInterface/DesignSystem/Sources/Font/OndoseeFontStyle.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
import Foundation | ||
|
||
public extension CGFloat { | ||
enum OndoseeFontStyle { | ||
case title1 | ||
case title2 | ||
case title3 | ||
case text1 | ||
case text2 | ||
case text3 | ||
case caption | ||
} | ||
} | ||
|
||
public extension CGFloat.OndoseeFontStyle { | ||
var size: CGFloat { | ||
switch self { | ||
case .title1: return 30 | ||
case .title2: return 25 | ||
case .title3: return 20 | ||
case .text1: return 17 | ||
case .text2: return 15 | ||
case .text3: return 13 | ||
case .caption: return 10 | ||
} | ||
} | ||
} |