193 lines
7.4 KiB
Swift
193 lines
7.4 KiB
Swift
//
|
|
// TypographyProtocol.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 7/27/22.
|
|
//
|
|
|
|
import Foundation
|
|
import VDSTypographyTokens
|
|
|
|
public protocol XXLFontable {
|
|
static var xxlBold: UIFont { get }
|
|
static var xxlRegular: UIFont { get }
|
|
}
|
|
|
|
public protocol XLFontable {
|
|
static var xlBold: UIFont { get }
|
|
static var xlRegular: UIFont { get }
|
|
}
|
|
|
|
public protocol LargeFontable {
|
|
static var largeBold: UIFont { get }
|
|
static var largeRegular: UIFont { get }
|
|
}
|
|
|
|
public protocol MediumFontable {
|
|
static var mediumBold: UIFont { get }
|
|
static var mediumRegular: UIFont { get }
|
|
}
|
|
|
|
public protocol SmallFontable {
|
|
static var smallBold: UIFont { get }
|
|
static var smallRegular: UIFont { get }
|
|
}
|
|
|
|
public protocol XSmallFontable {
|
|
static var xsmallBold: UIFont { get }
|
|
static var xsmallRegular: UIFont { get }
|
|
}
|
|
|
|
public protocol FeatureTypograhyProtocol: XLFontable, LargeFontable, MediumFontable, SmallFontable, XSmallFontable {}
|
|
|
|
public protocol TitleTypograhyProtocol: XXLFontable, XLFontable, LargeFontable, MediumFontable, SmallFontable {}
|
|
|
|
public protocol BodyTypograhyProtocol: LargeFontable, MediumFontable, SmallFontable {}
|
|
|
|
public protocol MicroTypographyProtocol {
|
|
static var bold: UIFont { get }
|
|
static var regular: UIFont { get }
|
|
}
|
|
|
|
//public struct VDSFontStyles {
|
|
// public enum Feature: FeatureTypograhyProtocol {
|
|
//
|
|
// private static func getFont(vdsFont: VDSFonts, size: AvailableSize) -> UIFont {
|
|
// switch size {
|
|
// case .xlarge:
|
|
// return vdsFont.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature144 : VDSTypography.fontSizeFeature96)
|
|
// case .large:
|
|
// return vdsFont.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature128 : VDSTypography.fontSizeFeature80)
|
|
// case .medium:
|
|
// return vdsFont.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature96 : VDSTypography.fontSizeFeature64)
|
|
// case .small:
|
|
// return vdsFont.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature80 : VDSTypography.fontSizeFeature48)
|
|
// case .xsmall:
|
|
// return vdsFont.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature64 : VDSTypography.fontSizeFeature40)
|
|
// }
|
|
// }
|
|
//
|
|
// public static var xlBold: UIFont {
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature144 : VDSTypography.fontSizeFeature96)
|
|
// }
|
|
//
|
|
// public static var xlRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature144 : VDSTypography.fontSizeFeature96)
|
|
// }
|
|
//
|
|
// public static var largeBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature128 : VDSTypography.fontSizeFeature80)
|
|
// }
|
|
//
|
|
// public static var largeRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature128 : VDSTypography.fontSizeFeature80)
|
|
// }
|
|
//
|
|
// public static var mediumBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature96 : VDSTypography.fontSizeFeature64)
|
|
// }
|
|
//
|
|
// public static var mediumRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature96 : VDSTypography.fontSizeFeature64)
|
|
// }
|
|
//
|
|
// public static var smallBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature80 : VDSTypography.fontSizeFeature48)
|
|
// }
|
|
//
|
|
// public static var smallRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature80 : VDSTypography.fontSizeFeature48)
|
|
// }
|
|
//
|
|
// public static var xsmallBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature64 : VDSTypography.fontSizeFeature40)
|
|
// }
|
|
//
|
|
// public static var xsmallRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature64 : VDSTypography.fontSizeFeature40)
|
|
// }
|
|
// }
|
|
//
|
|
// public enum Title: TitleTypograhyProtocol {
|
|
//
|
|
// public static var xxlBold: UIFont {
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle64 : VDSTypography.fontSizeTitle40)
|
|
// }
|
|
//
|
|
// public static var xxlRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle64 : VDSTypography.fontSizeTitle40)
|
|
// }
|
|
//
|
|
// public static var xlBold: UIFont {
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle48 : VDSTypography.fontSizeTitle32)
|
|
// }
|
|
//
|
|
// public static var xlRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle48 : VDSTypography.fontSizeTitle32)
|
|
// }
|
|
//
|
|
// public static var largeBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle32 : VDSTypography.fontSizeTitle24)
|
|
// }
|
|
//
|
|
// public static var largeRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle32 : VDSTypography.fontSizeTitle24)
|
|
// }
|
|
//
|
|
// public static var mediumBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle24 : VDSTypography.fontSizeTitle20)
|
|
// }
|
|
//
|
|
// public static var mediumRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle24 : VDSTypography.fontSizeTitle20)
|
|
// }
|
|
//
|
|
// public static var smallBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle20 : VDSTypography.fontSizeTitle16)
|
|
// }
|
|
//
|
|
// public static var smallRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle20 : VDSTypography.fontSizeTitle16)
|
|
// }
|
|
//
|
|
// }
|
|
//
|
|
// public enum Body: BodyTypograhyProtocol {
|
|
// public static var largeBold: UIFont {
|
|
// return VDSFonts.dsBold.font(ofSize: VDSTypography.fontSizeBody16)
|
|
// }
|
|
//
|
|
// public static var largeRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: VDSTypography.fontSizeBody16)
|
|
// }
|
|
//
|
|
// public static var mediumBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: VDSTypography.fontSizeBody14)
|
|
// }
|
|
//
|
|
// public static var mediumRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: VDSTypography.fontSizeBody14)
|
|
// }
|
|
//
|
|
// public static var smallBold: UIFont{
|
|
// return VDSFonts.dsBold.font(ofSize: VDSTypography.fontSizeBody12)
|
|
// }
|
|
//
|
|
// public static var smallRegular: UIFont{
|
|
// return VDSFonts.dsRegular.font(ofSize: VDSTypography.fontSizeBody12)
|
|
// }
|
|
//
|
|
//
|
|
// }
|
|
//
|
|
// public enum Micro: MicroTypographyProtocol {
|
|
// public static var bold: UIFont {
|
|
// return VDSFonts.txBold.font(ofSize: VDSTypography.fontSizeMicro11)
|
|
// }
|
|
//
|
|
// public static var regular: UIFont {
|
|
// return VDSFonts.txRegular.font(ofSize: VDSTypography.fontSizeMicro11)
|
|
// }
|
|
// }
|
|
//}
|