├── .gitignore
├── Example
├── VFontDemoUIKit
│ ├── Fonts
│ │ ├── Inter.ttf
│ │ ├── Uncut-Sans.ttf
│ │ ├── Zvin Serif.ttf
│ │ ├── Martian Mono.ttf
│ │ ├── Generated.swift
│ │ └── InfoPlistReader.swift
│ ├── Application
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ ├── AccentColor.colorset
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ └── LaunchScreen.storyboard
│ │ └── SceneDelegate.swift
│ ├── VFontDemoUIKit.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── project.pbxproj
│ ├── View
│ │ ├── AxisTagLabel.swift
│ │ ├── PaddingLabel.swift
│ │ ├── FontRow.swift
│ │ ├── AxisRow.swift
│ │ ├── FontRow.xib
│ │ └── AxisRow.xib
│ ├── VFontViewController.swift
│ ├── FontListViewController.swift
│ └── Main.storyboard
└── VFontDemoSwiftUI
│ ├── Martian Mono.ttf
│ ├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
│ ├── VFontDemoSwiftUI.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
│ ├── Info.plist
│ ├── VFontDemoSwiftUIApp.swift
│ ├── Views
│ ├── LargeTitle View
│ │ ├── LargeTitleView.swift
│ │ └── OrientationInfo.swift
│ └── DarkModeSwitcher.swift
│ └── ContentView.swift
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── Source
├── VFont.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── VFontDemoUIKit.xcscheme
│ └── project.pbxproj
└── Framework
│ ├── VFont.h
│ ├── Axis.swift
│ └── VFont.swift
├── VFont.xcworkspace
├── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── contents.xcworkspacedata
├── Package.swift
├── VFont.podspec
├── LICENSE.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *xcuserdata
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Fonts/Inter.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dufflink/vfont/HEAD/Example/VFontDemoUIKit/Fonts/Inter.ttf
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Martian Mono.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dufflink/vfont/HEAD/Example/VFontDemoSwiftUI/Martian Mono.ttf
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Fonts/Uncut-Sans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dufflink/vfont/HEAD/Example/VFontDemoUIKit/Fonts/Uncut-Sans.ttf
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Fonts/Zvin Serif.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dufflink/vfont/HEAD/Example/VFontDemoUIKit/Fonts/Zvin Serif.ttf
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Fonts/Martian Mono.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dufflink/vfont/HEAD/Example/VFontDemoUIKit/Fonts/Martian Mono.ttf
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Source/VFont.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/VFontDemoUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/VFontDemoSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/VFont.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIAppFonts
6 |
7 | Martian Mono.ttf
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Source/VFont.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/VFontDemoUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/VFontDemoSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/VFontDemoSwiftUIApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VFontDemoSwiftUIApp.swift
3 | // VFontDemoSwiftUI
4 | //
5 | // Created by Maxim Skorynin on 11.05.2022.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct VFontDemoSwiftUIApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Source/Framework/VFont.h:
--------------------------------------------------------------------------------
1 | //
2 | // VFont.h
3 | // VFont
4 | //
5 | // Created by Maxim Skorynin on 20.04.2022.
6 | //
7 |
8 | #import
9 |
10 | //! Project version number for VFont.
11 | FOUNDATION_EXPORT double VFontVersionNumber;
12 |
13 | //! Project version string for VFont.
14 | FOUNDATION_EXPORT const unsigned char VFontVersionString[];
15 |
--------------------------------------------------------------------------------
/VFont.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.6
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "VFont",
8 | platforms: [
9 | .macOS(.v11), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)
10 | ],
11 | products: [
12 | .library(
13 | name: "VFont",
14 | targets: ["VFont"]),
15 | ],
16 | targets: [
17 | .target(
18 | name: "VFont",
19 | path: "Source/Framework")
20 | ]
21 | )
22 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Fonts/Generated.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 25.04.2022.
6 | //
7 |
8 | import CoreGraphics
9 | import VFont
10 |
11 | class Zerif: VFont {
12 |
13 | public init(size: CGFloat) {
14 | super.init(name: "Zvin Serif", size: size)!
15 | }
16 |
17 | public var weight: CGFloat {
18 | get {
19 | return axes[2003265652]?.value ?? .zero
20 | } set {
21 | setValue(newValue, forAxisID: 2003265652)
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/VFont.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'VFont'
3 | s.version = '0.6.1'
4 |
5 | s.license = { :type => 'MIT', :file => 'LICENSE.md' }
6 | s.summary = 'Variable Fonts in Swift and SwiftUI'
7 |
8 | s.homepage = 'https://github.com/dufflink/vfont'
9 | s.authors = { 'Maxim Skorynin from Evil Martians' => 'skoryninmaksim1@gamil.com' }
10 |
11 | s.source = { :git => 'https://github.com/dufflink/vfont.git', :tag => s.version }
12 | s.documentation_url = 'https://github.com/dufflink/vfont'
13 |
14 | s.ios.deployment_target = '11.0'
15 |
16 | s.swift_versions = '5.0'
17 | s.source_files = 'Source/Framework'
18 | end
19 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/View/AxisTagLabel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AxisTagLabel.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 25.04.2022.
6 | //
7 |
8 | final class AxisTagLabel: PaddingLabel {
9 |
10 | convenience init(name: String) {
11 | self.init()
12 | text = name
13 |
14 | textColor = .white
15 | backgroundColor = #colorLiteral(red: 0.621404469, green: 0.319699049, blue: 0.8131730556, alpha: 1)
16 |
17 | layer.masksToBounds = true
18 | layer.cornerRadius = 4
19 |
20 | font = .systemFont(ofSize: 14, weight: .semibold)
21 |
22 | topInset = 2
23 | bottomInset = 2
24 |
25 | leftInset = 4
26 | rightInset = 4
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIUserInterfaceStyle
6 | Light
7 | UIAppFonts
8 |
9 | Martian Mono.ttf
10 | Inter.ttf
11 | Zvin Serif.ttf
12 | Uncut-Sans.ttf
13 |
14 | UIApplicationSceneManifest
15 |
16 | UIApplicationSupportsMultipleScenes
17 |
18 | UISceneConfigurations
19 |
20 | UIWindowSceneSessionRoleApplication
21 |
22 |
23 | UISceneConfigurationName
24 | Default Configuration
25 | UISceneDelegateClassName
26 | $(PRODUCT_MODULE_NAME).SceneDelegate
27 | UISceneStoryboardFile
28 | Main
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Maxim Skorynin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Views/LargeTitle View/LargeTitleView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LargeTitleView.swift
3 | // VFontDemoSwiftUI
4 | //
5 | // Created by Maxim Skorynin on 02.06.2022.
6 | //
7 |
8 | import SwiftUI
9 | import VFont
10 |
11 | struct LargeTitleView: View {
12 |
13 | @EnvironmentObject var orientationInfo: OrientationInfo
14 |
15 | var body: some View {
16 | VStack {
17 | let orientation = orientationInfo.orientation
18 |
19 | HStack {
20 | Text("Large title with few rows")
21 | .font(.martianMono(size: 42,
22 | width: orientation == .landscape ? 112 : 90,
23 | weight: 800))
24 | .padding(orientation == .landscape ? [.top, .leading] : [.horizontal, .top])
25 | Spacer()
26 | }
27 |
28 | Spacer()
29 | }
30 | .frame(maxWidth: .infinity, maxHeight: .infinity)
31 | }
32 |
33 | }
34 |
35 | struct LargeTitleView_Previews: PreviewProvider {
36 | static var previews: some View {
37 | LargeTitleView()
38 | .environmentObject(OrientationInfo())
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Views/LargeTitle View/OrientationInfo.swift:
--------------------------------------------------------------------------------
1 | //
2 | // OrientationInfo.swift
3 | // VFontDemoSwiftUI
4 | //
5 | // Created by Maxim Skorynin on 02.06.2022.
6 | //
7 |
8 | import UIKit
9 |
10 | final class OrientationInfo: ObservableObject {
11 |
12 | enum Orientation: String {
13 |
14 | case portrait
15 | case landscape
16 |
17 | }
18 |
19 | @Published var orientation: Orientation
20 |
21 | private var _observer: NSObjectProtocol?
22 |
23 | init() {
24 | orientation = UIDevice.current.orientation.isLandscape ? .landscape : .portrait
25 | print(orientation)
26 |
27 | _observer = NotificationCenter.default.addObserver(forName: UIDevice.orientationDidChangeNotification, object: nil, queue: nil) { [weak self] note in
28 | guard let device = note.object as? UIDevice else {
29 | return
30 | }
31 |
32 | self?.orientation = device.orientation.isPortrait ? .portrait : .landscape
33 | }
34 | }
35 |
36 | deinit {
37 | if let observer = _observer {
38 | NotificationCenter.default.removeObserver(observer)
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/View/PaddingLabel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PaddingLabel.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 25.04.2022.
6 | //
7 |
8 | import UIKit
9 |
10 | @IBDesignable class PaddingLabel: UILabel {
11 |
12 | @IBInspectable var topInset: CGFloat = 6
13 | @IBInspectable var bottomInset: CGFloat = 6
14 |
15 | @IBInspectable var leftInset: CGFloat = 8
16 | @IBInspectable var rightInset: CGFloat = 8
17 |
18 | // MARK: Life Cycle
19 |
20 | convenience init(topInset: CGFloat, bottomInset: CGFloat, leftInset: CGFloat, rightInset: CGFloat) {
21 | self.init()
22 |
23 | self.topInset = topInset
24 | self.bottomInset = bottomInset
25 |
26 | self.leftInset = leftInset
27 | self.rightInset = leftInset
28 | }
29 |
30 | // MARK: Overridable Functions
31 |
32 | override func drawText(in rect: CGRect) {
33 | let insets = UIEdgeInsets(top: topInset, left: leftInset, bottom: bottomInset, right: rightInset)
34 | super.drawText(in: rect.inset(by: insets))
35 | }
36 |
37 | override var intrinsicContentSize: CGSize {
38 | let size = super.intrinsicContentSize
39 | return CGSize(width: size.width + leftInset + rightInset, height: size.height + topInset + bottomInset)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/View/FontRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FontRow.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 25.04.2022.
6 | //
7 |
8 | import UIKit
9 | import VFont
10 |
11 | final class FontRow: UITableViewCell {
12 |
13 | static let id = "FontRow"
14 |
15 | @IBOutlet private weak var cardView: UIView!
16 |
17 | @IBOutlet private weak var titleLabel: UILabel!
18 | @IBOutlet private weak var stackView: UIStackView!
19 |
20 | override func prepareForReuse() {
21 | super.prepareForReuse()
22 | stackView.arrangedSubviews.forEach {
23 | $0.removeFromSuperview()
24 | }
25 | }
26 |
27 | override func awakeFromNib() {
28 | super.awakeFromNib()
29 | cardView.backgroundColor = #colorLiteral(red: 0.621404469, green: 0.319699049, blue: 0.8131730556, alpha: 0.1002604167)
30 | cardView.layer.cornerRadius = 20
31 | }
32 |
33 | func configure(vFont: VFont) {
34 | titleLabel.text = vFont.name
35 | titleLabel.font = vFont.uiFont
36 |
37 | for axis in vFont.axes {
38 | let axisName = axis.value.name.lowercased()
39 | let label = AxisTagLabel(name: axisName)
40 |
41 | stackView.addArrangedSubview(label)
42 | }
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/Source/Framework/Axis.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Axis.swift
3 | // VFont
4 | //
5 | // Created by Maxim Skorynin on 20.04.2022.
6 | //
7 |
8 | import CoreGraphics
9 |
10 | extension Axis {
11 |
12 | public enum AttrubuteName: String {
13 |
14 | case id = "NSCTVariationAxisIdentifier"
15 | case name = "NSCTVariationAxisName"
16 |
17 | case maxValue = "NSCTVariationAxisMaximumValue"
18 | case minValue = "NSCTVariationAxisMinimumValue"
19 |
20 | case defaultValue = "NSCTVariationAxisDefaultValue"
21 |
22 | }
23 |
24 | }
25 |
26 | public class Axis {
27 |
28 | public let id: Int
29 | public let name: String
30 |
31 | public let minValue: CGFloat
32 | public let maxValue: CGFloat
33 |
34 | public let defaultValue: CGFloat
35 |
36 | public var value: CGFloat
37 |
38 | init(attributes: [AttrubuteName: Any]) {
39 | self.id = attributes[.id] as? Int ?? 0
40 | self.name = attributes[.name] as? String ?? "unknown"
41 |
42 | self.minValue = attributes[.minValue] as? CGFloat ?? 0.0
43 | self.maxValue = attributes[.maxValue] as? CGFloat ?? 0.0
44 |
45 | self.defaultValue = attributes[.defaultValue] as? CGFloat ?? 0.0
46 | self.value = defaultValue
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Fonts/InfoPlistReader.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InfoPlistReader.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 26.04.2022.
6 | //
7 |
8 | import Foundation
9 |
10 | class InfoPlistReader {
11 |
12 | var infoPlistURL: URL? {
13 | return Bundle.main.url(forResource: "Info", withExtension: "plist")
14 | }
15 |
16 | func getFontNames() -> [String]? {
17 | guard let url = infoPlistURL else {
18 | print("Couldn't init Info.plist url")
19 | return nil
20 | }
21 |
22 | guard let data = try? Data(contentsOf: url) else {
23 | print("Couldn't get data from Info.plist")
24 | return nil
25 | }
26 |
27 | guard let dict = try? PropertyListSerialization.propertyList(from: data, options: [], format: nil) as? [String: Any] else {
28 | print("Couldn't init property list from Info.plist data")
29 | return nil
30 | }
31 |
32 | guard let fontNames = dict["UIAppFonts"] as? [String], fontNames.count > 0 else {
33 | print("Couldn't get fonts info from Info.plist property list or the info is empty")
34 | return nil
35 | }
36 |
37 | return fontNames.map {
38 | let name = $0.split(separator: ".").first ?? ""
39 | return String(name)
40 | }
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // VFontDemoUIKit
4 | //
5 | // Created by Maxim Skorynin on 11.05.2022.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // VFontDemoSwiftUI
4 | //
5 | // Created by Maxim Skorynin on 11.05.2022.
6 | //
7 |
8 | import SwiftUI
9 | import VFont
10 |
11 | extension Font {
12 |
13 | static func martianMono(size: CGFloat, width: CGFloat = 0, weight: CGFloat = 0) -> Font {
14 | return Font.vFont("Martian Mono", size: size, axes: [
15 | 2003072104: width,
16 | 2003265652: weight
17 | ])
18 | }
19 |
20 | }
21 |
22 | struct ContentView: View {
23 |
24 | @State private var width = 75.0
25 | @State private var weight = 300.0
26 |
27 | var body: some View {
28 | VStack {
29 | Text("Hello, world!")
30 | .font(.vFont("Martian Mono", size: 16, axes: [
31 | 2003072104: width,
32 | 2003265652: weight
33 | ]))
34 |
35 | Text("Evil Martians")
36 | .padding()
37 | .font(.martianMono(size: 16, width: CGFloat(width), weight: CGFloat(weight)))
38 |
39 | Slider(value: $width, in: 75...112)
40 | .padding()
41 | Slider(value: $weight, in: 100...800)
42 | .padding()
43 | }
44 | .onAppear {
45 | let font = VFont(name: "Martian Mono", size: 12)!
46 | print(font.getAxesDescription())
47 | }
48 | }
49 | }
50 |
51 | struct ContentView_Previews: PreviewProvider {
52 | static var previews: some View {
53 | ContentView()
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Views/DarkModeSwitcher.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DarkModeSwitcher.swift
3 | // VFontDemoSwiftUI
4 | //
5 | // Created by Maxim Skorynin on 01.06.2022.
6 | //
7 |
8 | import SwiftUI
9 | import VFont
10 |
11 | struct DarkModeSwitcher: View {
12 |
13 | @State var isDark = false
14 | @State var textColor = Color.black
15 |
16 | @Namespace var namespace
17 |
18 | var body: some View {
19 | ZStack {
20 | if isDark {
21 | Circle()
22 | .matchedGeometryEffect(id: "shape", in: namespace)
23 | .frame(width: 3000, height: 5000)
24 | .position(x: 0, y: -40)
25 | } else {
26 | Circle()
27 | .matchedGeometryEffect(id: "shape", in: namespace)
28 | .frame(width: 1, height: 1)
29 | .position(x: 0, y: -40)
30 | }
31 |
32 | Text("Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
33 | .padding()
34 | .font(.martianMono(size: 30, width: 100, weight: isDark ? 700 : 800))
35 | .foregroundColor(.white)
36 | .colorMultiply(textColor)
37 | }
38 | .frame(maxWidth: .infinity, maxHeight: .infinity)
39 | .onTapGesture {
40 | withAnimation(.easeIn(duration: 0.6)) {
41 | isDark.toggle()
42 | textColor = isDark ? .white : .black
43 | }
44 | }
45 | }
46 |
47 | }
48 |
49 | struct DarkModeSwitcher_Previews: PreviewProvider {
50 | static var previews: some View {
51 | DarkModeSwitcher()
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "2x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "83.5x83.5"
82 | },
83 | {
84 | "idiom" : "ios-marketing",
85 | "scale" : "1x",
86 | "size" : "1024x1024"
87 | }
88 | ],
89 | "info" : {
90 | "author" : "xcode",
91 | "version" : 1
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "2x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "83.5x83.5"
82 | },
83 | {
84 | "idiom" : "ios-marketing",
85 | "scale" : "1x",
86 | "size" : "1024x1024"
87 | }
88 | ],
89 | "info" : {
90 | "author" : "xcode",
91 | "version" : 1
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/View/AxisRow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AxisRow.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 25.04.2022.
6 | //
7 |
8 | import UIKit
9 | import VFont
10 |
11 | protocol AxisRowDelegate: AnyObject {
12 |
13 | func axisDidChange(_ axis: Axis, value: CGFloat)
14 |
15 | }
16 |
17 | final class AxisRow: UITableViewCell {
18 |
19 | static let id = "AxisRow"
20 |
21 | weak var delegate: AxisRowDelegate?
22 |
23 | @IBOutlet private weak var cardView: UIView!
24 | @IBOutlet private weak var slider: UISlider!
25 |
26 | @IBOutlet private weak var titleLabel: UILabel!
27 | @IBOutlet private weak var valueLabel: UILabel!
28 |
29 | @IBOutlet private weak var maxValueLabel: UILabel!
30 | @IBOutlet private weak var minValueLabel: UILabel!
31 |
32 | private var axis: Axis?
33 |
34 | override func awakeFromNib() {
35 | super.awakeFromNib()
36 | cardView.backgroundColor = #colorLiteral(red: 0.621404469, green: 0.319699049, blue: 0.8131730556, alpha: 0.1002604167)
37 | cardView.layer.cornerRadius = 20
38 | }
39 |
40 | func configure(axis: Axis) {
41 | let minValue = Float(axis.minValue)
42 | let maxValue = Float(axis.maxValue)
43 | let value = Float(axis.value)
44 |
45 | slider.minimumValue = minValue
46 | slider.maximumValue = maxValue
47 | slider.setValue(value, animated: true)
48 |
49 | minValueLabel.text = String(Int(minValue))
50 | maxValueLabel.text = String(Int(maxValue))
51 | valueLabel.text = String(Int(value))
52 |
53 | titleLabel.text = axis.name
54 | self.axis = axis
55 | }
56 |
57 | @IBAction func sliderValueDidChange(_ sender: Any) {
58 | guard let axis = axis else {
59 | return
60 | }
61 |
62 | valueLabel.text = String(Int(slider.value))
63 | delegate?.axisDidChange(axis, value: CGFloat(slider.value))
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Application/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // VFontDemoUIKit
4 | //
5 | // Created by Maxim Skorynin on 11.05.2022.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
15 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
16 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
17 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
18 | guard let _ = (scene as? UIWindowScene) else { return }
19 | }
20 |
21 | func sceneDidDisconnect(_ scene: UIScene) {
22 | // Called as the scene is being released by the system.
23 | // This occurs shortly after the scene enters the background, or when its session is discarded.
24 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
25 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
26 | }
27 |
28 | func sceneDidBecomeActive(_ scene: UIScene) {
29 | // Called when the scene has moved from an inactive state to an active state.
30 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
31 | }
32 |
33 | func sceneWillResignActive(_ scene: UIScene) {
34 | // Called when the scene will move from an active state to an inactive state.
35 | // This may occur due to temporary interruptions (ex. an incoming phone call).
36 | }
37 |
38 | func sceneWillEnterForeground(_ scene: UIScene) {
39 | // Called as the scene transitions from the background to the foreground.
40 | // Use this method to undo the changes made on entering the background.
41 | }
42 |
43 | func sceneDidEnterBackground(_ scene: UIScene) {
44 | // Called as the scene transitions from the foreground to the background.
45 | // Use this method to save data, release shared resources, and store enough scene-specific state information
46 | // to restore the scene back to its current state.
47 | }
48 |
49 |
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/VFontViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VFontViewController.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 20.04.2022.
6 | //
7 |
8 | import UIKit
9 | import VFont
10 |
11 | final class VFontViewController: UIViewController {
12 |
13 | @IBOutlet private weak var textLabel: UILabel!
14 | @IBOutlet private weak var tableView: UITableView!
15 |
16 | private(set) var vFont: VFont!
17 | private var axes: [Axis] = []
18 |
19 | // MARK: Life Cycle
20 |
21 | static func instance(vFont: VFont) -> VFontViewController? {
22 | let controller = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "VFontViewController") as? VFontViewController
23 | controller?.vFont = vFont
24 | controller?.axes = Array(vFont.axes.values)
25 |
26 | return controller
27 | }
28 |
29 | override func viewDidLoad() {
30 | super.viewDidLoad()
31 | title = vFont?.name
32 | textLabel.font = vFont?.uiFont
33 |
34 | vFont.updated = { [weak self] font in
35 | self?.textLabel.font = font
36 | }
37 |
38 | configureTableView()
39 | }
40 |
41 | // MARK: Functions
42 |
43 | private func configureTableView() {
44 | tableView.transform = .init(rotationAngle: .pi)
45 |
46 | tableView.dataSource = self
47 | tableView.register(.init(nibName: AxisRow.id, bundle: nil), forCellReuseIdentifier: AxisRow.id)
48 | }
49 |
50 | }
51 |
52 | // MARK: - UITableView DataSource
53 |
54 | extension VFontViewController: UITableViewDataSource {
55 |
56 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
57 | let row = tableView.dequeueReusableCell(withIdentifier: AxisRow.id, for: indexPath) as? AxisRow
58 | let axis = axes[indexPath.row]
59 |
60 | row?.configure(axis: axis)
61 | row?.delegate = self
62 |
63 | row?.transform = .init(rotationAngle: .pi)
64 |
65 | return row ?? .init()
66 | }
67 |
68 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
69 | return axes.count
70 | }
71 |
72 | }
73 |
74 | // MARK: - AxisRow Delegate
75 |
76 | extension VFontViewController: AxisRowDelegate {
77 |
78 | func axisDidChange(_ axis: Axis, value: CGFloat) {
79 | vFont.setValue(value, forAxisID: axis.id)
80 | }
81 |
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/FontListViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FontListViewController.swift
3 | // VFontDemo
4 | //
5 | // Created by Maxim Skorynin on 25.04.2022.
6 | //
7 |
8 | import UIKit
9 | import VFont
10 |
11 | final class FontListViewController: UIViewController {
12 |
13 | private let defaultFontSize: CGFloat = 30.0
14 | private var vFonts: [VFont] = []
15 |
16 | @IBOutlet private weak var tableView: UITableView!
17 |
18 | // MARK: Life Cycle
19 |
20 | override func viewDidLoad() {
21 | super.viewDidLoad()
22 | readFonts()
23 |
24 | if vFonts.isEmpty {
25 | tableView.isHidden = true
26 | } else {
27 | configureTableView()
28 | }
29 | }
30 |
31 | override func viewWillAppear(_ animated: Bool) {
32 | super.viewWillAppear(animated)
33 | tableView.reloadData()
34 | }
35 |
36 | // MARK: Functions
37 |
38 | private func configureTableView() {
39 | tableView.delegate = self
40 | tableView.dataSource = self
41 |
42 | tableView.register(.init(nibName: FontRow.id, bundle: nil), forCellReuseIdentifier: FontRow.id)
43 | }
44 |
45 | private func readFonts() {
46 | guard let fontNames = InfoPlistReader().getFontNames() else {
47 | return
48 | }
49 |
50 | vFonts = fontNames.compactMap { VFont(name: $0, size: defaultFontSize) }
51 | }
52 |
53 | }
54 |
55 | // MARK: - UITableView DataSource & UITableViewDelegate
56 |
57 | extension FontListViewController: UITableViewDataSource, UITableViewDelegate {
58 |
59 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
60 | let row = tableView.dequeueReusableCell(withIdentifier: FontRow.id, for: indexPath) as? FontRow
61 |
62 | let vFont = vFonts[indexPath.row]
63 | row?.configure(vFont: vFont)
64 |
65 | return row ?? .init()
66 | }
67 |
68 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
69 | return vFonts.count
70 | }
71 |
72 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
73 | let vFont = vFonts[indexPath.row]
74 |
75 | guard let vFontViewController = VFontViewController.instance(vFont: vFont) else {
76 | return
77 | }
78 |
79 | navigationController?.pushViewController(vFontViewController, animated: true)
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/Source/VFont.xcodeproj/xcshareddata/xcschemes/VFontDemoUIKit.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
45 |
51 |
52 |
53 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Source/Framework/VFont.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VFont.swift
3 | // VFont
4 | //
5 | // Created by Maxim Skorynin on 20.04.2022.
6 | //
7 |
8 | import SwiftUI
9 |
10 | open class VFont {
11 |
12 | private(set) public var uiFont: UIFont
13 |
14 | private(set) public var name: String
15 | private(set) public var size: CGFloat
16 |
17 | private(set) public var axes: [Int: Axis]
18 |
19 | public var updated: ((UIFont?) -> Void)?
20 |
21 | public var variableFontName: String {
22 | return uiFont.fontName
23 | }
24 |
25 | // MARK: Life Cycle
26 |
27 | public init?(name: String, size: CGFloat) {
28 | guard let uiFont = UIFont(name: name, size: size) else {
29 | print("Couldn't init font \(name). Make sure you've added this font to the project. Please, check the font name is correct.")
30 | return nil
31 | }
32 |
33 | let ctFont = CTFontCreateWithName(uiFont.fontName as CFString, size, nil)
34 |
35 | guard let variationAxes = CTFontCopyVariationAxes(ctFont) as? [Any], !variationAxes.isEmpty else {
36 | print("This font \(uiFont.fontName) doesn't support variations")
37 | return nil
38 | }
39 |
40 | self.name = name
41 | self.size = size
42 |
43 | self.uiFont = uiFont
44 |
45 | self.axes = variationAxes.reduce(into: [Int: Axis]()) { result, axis in
46 | let axisDict = axis as? [String: Any] ?? [:]
47 |
48 | let attributes = axisDict.reduce(into: [Axis.AttrubuteName: Any]()) { result, attribute in
49 | if let key = Axis.AttrubuteName(rawValue: attribute.key) {
50 | result[key] = attribute.value
51 | } else {
52 | print("Couldn't parse the \(attribute.key) font attribute")
53 | }
54 | }
55 |
56 | let axis = Axis(attributes: attributes)
57 | result[axis.id] = axis
58 | }
59 | }
60 |
61 | // MARK: Public Functions
62 |
63 | public func setValue(_ value: CGFloat, forAxisID id: Int) {
64 | _setValue(value, axisID: id)
65 |
66 | updateFont()
67 | updated?(uiFont)
68 | }
69 |
70 | public func setValues(forAxes axes: [Int: CGFloat]) {
71 | axes.forEach { axisID, value in
72 | _setValue(value, axisID: axisID)
73 | }
74 |
75 | updateFont()
76 | updated?(uiFont)
77 | }
78 |
79 | public func getAxesDescription() -> String {
80 | var description = "Font - \(name)\n\n"
81 | description += "Axes:\n"
82 |
83 | axes.forEach {
84 | Mirror(reflecting: $0.value).children.forEach {
85 | description += "\($0.label ?? "No label"): \($0.value)\n"
86 | }
87 |
88 | description += "-----\n"
89 | }
90 |
91 | return description
92 | }
93 |
94 | // MARK: Private Functions
95 |
96 | private func _setValue(_ value: CGFloat, axisID: Int) {
97 | guard let axis = axes[axisID] else {
98 | print("This axis with '\(axisID)' id doesn't exist")
99 | return
100 | }
101 |
102 | axis.value = value
103 | }
104 |
105 | private func updateFont() {
106 | var variations = [Int: Any]()
107 |
108 | axes.forEach { axisID, axis in
109 | variations[axisID] = axis.value
110 | }
111 |
112 | let key = kCTFontVariationAttribute as UIFontDescriptor.AttributeName
113 | let uiFontDescriptor = UIFontDescriptor(fontAttributes: [.name: variableFontName, key: variations])
114 |
115 | uiFont = UIFont(descriptor: uiFontDescriptor, size: uiFont.pointSize)
116 | }
117 |
118 | }
119 |
120 | // MARK: - SwiftUI Support
121 |
122 | @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
123 | public extension Font {
124 |
125 | static func vFont(_ name: String, size: CGFloat, axisID: Int, value: CGFloat) -> Font {
126 | let vFont = VFont(name: name, size: size)
127 | vFont?.setValue(value, forAxisID: axisID)
128 |
129 | let uiFont = vFont?.uiFont ?? .systemFont(ofSize: size)
130 | return Font(uiFont)
131 | }
132 |
133 | static func vFont(_ name: String, size: CGFloat, axes: [Int: CGFloat] = [:]) -> Font {
134 | let vFont = VFont(name: name, size: size)
135 | vFont?.setValues(forAxes: axes)
136 |
137 | let uiFont = vFont?.uiFont ?? .systemFont(ofSize: size)
138 | return Font(uiFont)
139 | }
140 |
141 | }
142 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/View/FontRow.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://img.shields.io/badge/Version-0.6.1-red?style=flat-square)
2 | [](https://img.shields.io/badge/Platforms-iOS-blue?style=flat-square)
3 | [](https://img.shields.io/badge/SwiftUI-compatible-orange?style=flat-square)
4 | [](https://img.shields.io/badge/Swift_Package_Manager-compatible-green?style=flat-square)
5 | [](https://img.shields.io/badge/Cocoapods-compatible-green?style=flat-square)
6 |
7 | # VFont
8 |
9 |
10 |
12 |
13 | `VFont` is a brilliant library which simplifies working with variable fonts in iOS projects.
14 |
15 | If you've never heard about variable fonts, I'd recommend reading this article [Variable fonts in real life: how to use and love them](https://evilmartians.com/chronicles/variable-fonts-in-real-life-how-to-use-and-love-them) by [@romashamin](https://github.com/romashamin)
16 |
17 |
18 |
23 |
24 |
25 | ## What does the library make easier?
26 |
27 | First of all, I wondered if variable fonts are supported in iOS. Nowadays, developers use the top-level `UIFont` class to work individually with Light, Regular, Medium, Bold, and other font styles. I discovered that VF support had already been added in `iOS 3.2`. However, it was implemented using low level code in the `CTFont` class in the `CoreText` library. This leads to extra work in order to get to variable fonts using `CoreText` and `UIFont`.
28 |
29 | ## Usage
30 | First, you need to add the custom variable font to your project. If you've never done this, I recommend reading this [tutorial](https://sarunw.com/posts/how-to-add-custom-fonts-to-ios-app).
31 | >❗️ Be aware that the font file name can be different from the actual font name! To get the correct full font name, upload the font file to [fontgauntlet.com](https://fontgauntlet.com/).
32 | ### Native instruments
33 | ```swift
34 | // First, you have to get information about the variable font (axes names, IDs, and allowed values). But the current axis value isn't there 🤷♂️
35 | // Here you can face a problem, like the custom font wasn't added to the project, was added incorrectly, or font name isn't correct
36 | let uiFont = UIFont(name: "Martian Mono", size: 16.0)!
37 | let ctFont = CTFontCreateWithName(uiFont.fontName as CFString, 16.0, nil)
38 | let variationAxes = CTFontCopyVariationAxes(ctFont) as! [Any] // font information with weird format 👎
39 |
40 | // To set new values you need to know the correct axis IDs and allowed values (maxValue and minValue)
41 | let variations = [2003265652: 600, 2003072104: 100] // 2003265652 - 'Weight'; 2003072104 - `Width`
42 |
43 | // As we know, text elements in UIKit use the UIFont class. So, you have to create new UIFont object with new values for axes
44 | let uiFontDescriptor = UIFontDescriptor(fontAttributes: [.name: uiFont.fontName, kCTFontVariationAttribute as UIFontDescriptor.AttributeName: variations])
45 | let newUIFont = UIFont(descriptor: uiFontDescriptor, size: uiFont.pointSize)
46 | // Now, you can apply the UIFont object for UI text elements
47 | // Here you may notice the name of the new UIFont object has been changed to 'MartianMono-Regular_wght2580000_wdth640000'
48 | let label = UILabel()
49 | label.font = newUIFont
50 | ```
51 | If you want to continue changing the current font object, or if you'd like to create more complex logic, you need to store the `UIFont` object. Moreover, you should parse the variation axes values and store these, too. But don't worry, `VFont` will do this for you!
52 |
53 | ### VFont library
54 | #### UIKit
55 | ```swift
56 | import VFont
57 |
58 | let vFont = VFont(name: "Martian Mono", size: 16)! // UIFont like initialization
59 | vFont.setValue(400, forAxisID: 2003265652) // setting a new value for the 'Weight' axis
60 |
61 | let label = UILabel()
62 | label.font = vFont.uiFont // apply the variable font for a UI text element
63 | ```
64 | ```swift
65 | vFont.getAxesDescription() // get the font information with а human readable format, if you need it ✅
66 |
67 | // override the `updated` closure to observe all font changes, if you're going to change it at runtime
68 | vFont.updated = { uiFont in
69 | label.font = uiFont
70 | }
71 | ```
72 | #### SwiftUI
73 | ```swift
74 | struct ContentView: View {
75 |
76 | var body: some View {
77 | Text("Title 1")
78 | .font(.vFont("Martian Mono", size: 16, axisID: 2003265652, value: 450))
79 | Text("Title 2")
80 | .font(.vFont("Inter", size: 32, axes: [2003072104: 80, 2003265652: 490])
81 | }
82 |
83 | }
84 | ```
85 | > Why do we use number IDs instead of axis names? Good question! But the answer is really simple. The `CTFont` framework which works with variable fonts under the hood returns different axis names for different system languages. This means that only the axis number IDs are unique values. If you find a way of receiving English names regardless of system language, I would appreciate knowing about this!
86 |
87 | ## Installation
88 | ### Swift Package Manager
89 |
90 | - `File` > `Swift Packages` > `Add Package Dependency`
91 | - Search `https://github.com/dufflink/vfont`
92 | - Select `Up to Next Major` with `0.6.1`
93 |
94 | ### Cocoapods
95 |
96 | To integrate `VFont` to your Xcode project using CocoaPods, specify it in your `Podfile`:
97 |
98 | ```ruby
99 | pod 'VFont'
100 | ```
101 |
102 | ## Advanced usage
103 | If you use `UIKit`, you can create your own font class inheriting the `VFont` class!
104 |
105 | ### UIKit
106 | ```swift
107 | import VFont
108 |
109 | final class MartianMono: VFont {
110 |
111 | init?(size: CGFloat) {
112 | super.init(name: "Martian Mono", size: size)
113 | }
114 |
115 | var weight: CGFloat {
116 | get {
117 | return axes[2003265652]?.value ?? .zero
118 | } set {
119 | setValue(newValue, axisID: 2003265652)
120 | }
121 | }
122 |
123 | var width: CGFloat {
124 | get {
125 | return axes[2003072104]?.value ?? .zero
126 | } set {
127 | setValue(newValue, axisID: 2003072104)
128 | }
129 | }
130 |
131 | }
132 | ```
133 | ```swift
134 | let font = MartianMono(size: 16)
135 |
136 | font?.weight = 300
137 | font?.width = 90
138 | ```
139 | ### SwiftUI
140 | In a `SwiftUI` project you can create `static method` as a `Font` structure extension:
141 | ```swift
142 | extension Font {
143 |
144 | static func martianMono(size: CGFloat, width: CGFloat = 0, weight: CGFloat = 0) -> Font {
145 | return .vFont("Martian Mono", size: size, axes: [
146 | 2003072104: width,
147 | 2003265652: weight
148 | ])
149 | }
150 |
151 | }
152 | ```
153 | ```swift
154 | struct ContentView: View {
155 |
156 | var body: some View {
157 | Text("Hello, world!")
158 | .font(.martianMono(size: 16, width: 300, weight: 100))
159 | }
160 |
161 | }
162 | ```
163 | ## Examples
164 | Move on to [Examples](https://github.com/dufflink/vfont/tree/master/Example) and research how does it work! Also, you can lanch the examples in Xcode. To complete this, clone the repository and launch the `VFont.xcworkspace` file.
165 |
166 | https://user-images.githubusercontent.com/29461219/167891461-f3c9a035-9d36-4e93-8a47-0a02ed1b0007.mp4
167 |
168 | ## Roadmap
169 | - The next step is creating a script that will parse the `Info.plist` file and which will automatically generate the font classes for UIKit and the extensions for SwiftUI. The generated code will have the same structure as in the [Font class](https://github.com/dufflink/vfont/edit/master/README.md#font-class) section abowe.
170 |
171 | - Support for tvOS, watchOS, and macOS
172 |
173 | ## License
174 | VFont is released under the MIT license. [See LICENSE](https://github.com/dufflink/vfont/blob/master/LICENSE.md) for details.
175 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/View/AxisRow.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
42 |
48 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/Source/VFont.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 55;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B084D646280FE67D007D5DA5 /* VFont.h in Headers */ = {isa = PBXBuildFile; fileRef = B084D638280FE67D007D5DA5 /* VFont.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | B084D651280FE6CB007D5DA5 /* VFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = B084D650280FE6CB007D5DA5 /* VFont.swift */; };
12 | B084D673280FFC89007D5DA5 /* Axis.swift in Sources */ = {isa = PBXBuildFile; fileRef = B084D672280FFC89007D5DA5 /* Axis.swift */; };
13 | /* End PBXBuildFile section */
14 |
15 | /* Begin PBXFileReference section */
16 | B084D635280FE67D007D5DA5 /* VFont.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VFont.framework; sourceTree = BUILT_PRODUCTS_DIR; };
17 | B084D638280FE67D007D5DA5 /* VFont.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VFont.h; sourceTree = ""; };
18 | B084D650280FE6CB007D5DA5 /* VFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VFont.swift; sourceTree = ""; };
19 | B084D672280FFC89007D5DA5 /* Axis.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Axis.swift; sourceTree = ""; };
20 | B0AFC9F12816E31E0010F67A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/iOSSupport/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
21 | /* End PBXFileReference section */
22 |
23 | /* Begin PBXFrameworksBuildPhase section */
24 | B084D632280FE67D007D5DA5 /* Frameworks */ = {
25 | isa = PBXFrameworksBuildPhase;
26 | buildActionMask = 2147483647;
27 | files = (
28 | );
29 | runOnlyForDeploymentPostprocessing = 0;
30 | };
31 | /* End PBXFrameworksBuildPhase section */
32 |
33 | /* Begin PBXGroup section */
34 | B084D62B280FE67D007D5DA5 = {
35 | isa = PBXGroup;
36 | children = (
37 | B084D64F280FE6B5007D5DA5 /* Framework */,
38 | B084D636280FE67D007D5DA5 /* Products */,
39 | B084D66C280FEA2D007D5DA5 /* Frameworks */,
40 | );
41 | sourceTree = "";
42 | };
43 | B084D636280FE67D007D5DA5 /* Products */ = {
44 | isa = PBXGroup;
45 | children = (
46 | B084D635280FE67D007D5DA5 /* VFont.framework */,
47 | );
48 | name = Products;
49 | sourceTree = "";
50 | };
51 | B084D64F280FE6B5007D5DA5 /* Framework */ = {
52 | isa = PBXGroup;
53 | children = (
54 | B084D638280FE67D007D5DA5 /* VFont.h */,
55 | B084D650280FE6CB007D5DA5 /* VFont.swift */,
56 | B084D672280FFC89007D5DA5 /* Axis.swift */,
57 | );
58 | path = Framework;
59 | sourceTree = "";
60 | };
61 | B084D66C280FEA2D007D5DA5 /* Frameworks */ = {
62 | isa = PBXGroup;
63 | children = (
64 | B0AFC9F12816E31E0010F67A /* UIKit.framework */,
65 | );
66 | name = Frameworks;
67 | sourceTree = "";
68 | };
69 | /* End PBXGroup section */
70 |
71 | /* Begin PBXHeadersBuildPhase section */
72 | B084D630280FE67D007D5DA5 /* Headers */ = {
73 | isa = PBXHeadersBuildPhase;
74 | buildActionMask = 2147483647;
75 | files = (
76 | B084D646280FE67D007D5DA5 /* VFont.h in Headers */,
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXHeadersBuildPhase section */
81 |
82 | /* Begin PBXNativeTarget section */
83 | B084D634280FE67D007D5DA5 /* VFont */ = {
84 | isa = PBXNativeTarget;
85 | buildConfigurationList = B084D649280FE67D007D5DA5 /* Build configuration list for PBXNativeTarget "VFont" */;
86 | buildPhases = (
87 | B084D630280FE67D007D5DA5 /* Headers */,
88 | B084D631280FE67D007D5DA5 /* Sources */,
89 | B084D632280FE67D007D5DA5 /* Frameworks */,
90 | B084D633280FE67D007D5DA5 /* Resources */,
91 | );
92 | buildRules = (
93 | );
94 | dependencies = (
95 | );
96 | name = VFont;
97 | productName = VFont;
98 | productReference = B084D635280FE67D007D5DA5 /* VFont.framework */;
99 | productType = "com.apple.product-type.framework";
100 | };
101 | /* End PBXNativeTarget section */
102 |
103 | /* Begin PBXProject section */
104 | B084D62C280FE67D007D5DA5 /* Project object */ = {
105 | isa = PBXProject;
106 | attributes = {
107 | BuildIndependentTargetsInParallel = 1;
108 | LastSwiftUpdateCheck = 1330;
109 | LastUpgradeCheck = 1330;
110 | TargetAttributes = {
111 | B084D634280FE67D007D5DA5 = {
112 | CreatedOnToolsVersion = 13.3;
113 | };
114 | };
115 | };
116 | buildConfigurationList = B084D62F280FE67D007D5DA5 /* Build configuration list for PBXProject "VFont" */;
117 | compatibilityVersion = "Xcode 13.0";
118 | developmentRegion = en;
119 | hasScannedForEncodings = 0;
120 | knownRegions = (
121 | en,
122 | Base,
123 | );
124 | mainGroup = B084D62B280FE67D007D5DA5;
125 | productRefGroup = B084D636280FE67D007D5DA5 /* Products */;
126 | projectDirPath = "";
127 | projectRoot = "";
128 | targets = (
129 | B084D634280FE67D007D5DA5 /* VFont */,
130 | );
131 | };
132 | /* End PBXProject section */
133 |
134 | /* Begin PBXResourcesBuildPhase section */
135 | B084D633280FE67D007D5DA5 /* Resources */ = {
136 | isa = PBXResourcesBuildPhase;
137 | buildActionMask = 2147483647;
138 | files = (
139 | );
140 | runOnlyForDeploymentPostprocessing = 0;
141 | };
142 | /* End PBXResourcesBuildPhase section */
143 |
144 | /* Begin PBXSourcesBuildPhase section */
145 | B084D631280FE67D007D5DA5 /* Sources */ = {
146 | isa = PBXSourcesBuildPhase;
147 | buildActionMask = 2147483647;
148 | files = (
149 | B084D673280FFC89007D5DA5 /* Axis.swift in Sources */,
150 | B084D651280FE6CB007D5DA5 /* VFont.swift in Sources */,
151 | );
152 | runOnlyForDeploymentPostprocessing = 0;
153 | };
154 | /* End PBXSourcesBuildPhase section */
155 |
156 | /* Begin XCBuildConfiguration section */
157 | B084D647280FE67D007D5DA5 /* Debug */ = {
158 | isa = XCBuildConfiguration;
159 | buildSettings = {
160 | ALWAYS_SEARCH_USER_PATHS = NO;
161 | CLANG_ANALYZER_NONNULL = YES;
162 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
163 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
164 | CLANG_ENABLE_MODULES = YES;
165 | CLANG_ENABLE_OBJC_ARC = YES;
166 | CLANG_ENABLE_OBJC_WEAK = YES;
167 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
168 | CLANG_WARN_BOOL_CONVERSION = YES;
169 | CLANG_WARN_COMMA = YES;
170 | CLANG_WARN_CONSTANT_CONVERSION = YES;
171 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
172 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
173 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
174 | CLANG_WARN_EMPTY_BODY = YES;
175 | CLANG_WARN_ENUM_CONVERSION = YES;
176 | CLANG_WARN_INFINITE_RECURSION = YES;
177 | CLANG_WARN_INT_CONVERSION = YES;
178 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
179 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
180 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
181 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
182 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
183 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
184 | CLANG_WARN_STRICT_PROTOTYPES = YES;
185 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
186 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
187 | CLANG_WARN_UNREACHABLE_CODE = YES;
188 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
189 | COPY_PHASE_STRIP = NO;
190 | CURRENT_PROJECT_VERSION = 1;
191 | DEBUG_INFORMATION_FORMAT = dwarf;
192 | ENABLE_STRICT_OBJC_MSGSEND = YES;
193 | ENABLE_TESTABILITY = YES;
194 | GCC_C_LANGUAGE_STANDARD = gnu11;
195 | GCC_DYNAMIC_NO_PIC = NO;
196 | GCC_NO_COMMON_BLOCKS = YES;
197 | GCC_OPTIMIZATION_LEVEL = 0;
198 | GCC_PREPROCESSOR_DEFINITIONS = (
199 | "DEBUG=1",
200 | "$(inherited)",
201 | );
202 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
203 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
204 | GCC_WARN_UNDECLARED_SELECTOR = YES;
205 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
206 | GCC_WARN_UNUSED_FUNCTION = YES;
207 | GCC_WARN_UNUSED_VARIABLE = YES;
208 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
209 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
210 | MTL_FAST_MATH = YES;
211 | ONLY_ACTIVE_ARCH = YES;
212 | SDKROOT = iphoneos;
213 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
214 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
215 | VERSIONING_SYSTEM = "apple-generic";
216 | VERSION_INFO_PREFIX = "";
217 | };
218 | name = Debug;
219 | };
220 | B084D648280FE67D007D5DA5 /* Release */ = {
221 | isa = XCBuildConfiguration;
222 | buildSettings = {
223 | ALWAYS_SEARCH_USER_PATHS = NO;
224 | CLANG_ANALYZER_NONNULL = YES;
225 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
226 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
227 | CLANG_ENABLE_MODULES = YES;
228 | CLANG_ENABLE_OBJC_ARC = YES;
229 | CLANG_ENABLE_OBJC_WEAK = YES;
230 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
231 | CLANG_WARN_BOOL_CONVERSION = YES;
232 | CLANG_WARN_COMMA = YES;
233 | CLANG_WARN_CONSTANT_CONVERSION = YES;
234 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
235 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
236 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
237 | CLANG_WARN_EMPTY_BODY = YES;
238 | CLANG_WARN_ENUM_CONVERSION = YES;
239 | CLANG_WARN_INFINITE_RECURSION = YES;
240 | CLANG_WARN_INT_CONVERSION = YES;
241 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
242 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
243 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
244 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
245 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
246 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
247 | CLANG_WARN_STRICT_PROTOTYPES = YES;
248 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
249 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
250 | CLANG_WARN_UNREACHABLE_CODE = YES;
251 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
252 | COPY_PHASE_STRIP = NO;
253 | CURRENT_PROJECT_VERSION = 1;
254 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
255 | ENABLE_NS_ASSERTIONS = NO;
256 | ENABLE_STRICT_OBJC_MSGSEND = YES;
257 | GCC_C_LANGUAGE_STANDARD = gnu11;
258 | GCC_NO_COMMON_BLOCKS = YES;
259 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
260 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
261 | GCC_WARN_UNDECLARED_SELECTOR = YES;
262 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
263 | GCC_WARN_UNUSED_FUNCTION = YES;
264 | GCC_WARN_UNUSED_VARIABLE = YES;
265 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
266 | MTL_ENABLE_DEBUG_INFO = NO;
267 | MTL_FAST_MATH = YES;
268 | SDKROOT = iphoneos;
269 | SWIFT_COMPILATION_MODE = wholemodule;
270 | SWIFT_OPTIMIZATION_LEVEL = "-O";
271 | VALIDATE_PRODUCT = YES;
272 | VERSIONING_SYSTEM = "apple-generic";
273 | VERSION_INFO_PREFIX = "";
274 | };
275 | name = Release;
276 | };
277 | B084D64A280FE67D007D5DA5 /* Debug */ = {
278 | isa = XCBuildConfiguration;
279 | buildSettings = {
280 | CODE_SIGN_STYLE = Automatic;
281 | CURRENT_PROJECT_VERSION = 8;
282 | DEFINES_MODULE = YES;
283 | DEVELOPMENT_TEAM = CX6AZ34SLQ;
284 | DYLIB_COMPATIBILITY_VERSION = 1;
285 | DYLIB_CURRENT_VERSION = 1;
286 | DYLIB_INSTALL_NAME_BASE = "@rpath";
287 | GENERATE_INFOPLIST_FILE = YES;
288 | INFOPLIST_KEY_NSHumanReadableCopyright = "";
289 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
290 | LD_RUNPATH_SEARCH_PATHS = (
291 | "$(inherited)",
292 | "@executable_path/Frameworks",
293 | "@loader_path/Frameworks",
294 | );
295 | MARKETING_VERSION = 0.6.1;
296 | PRODUCT_BUNDLE_IDENTIFIER = evilmartians.VFont;
297 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
298 | SKIP_INSTALL = YES;
299 | SWIFT_EMIT_LOC_STRINGS = YES;
300 | SWIFT_VERSION = 5.0;
301 | TARGETED_DEVICE_FAMILY = "1,2";
302 | };
303 | name = Debug;
304 | };
305 | B084D64B280FE67D007D5DA5 /* Release */ = {
306 | isa = XCBuildConfiguration;
307 | buildSettings = {
308 | CODE_SIGN_STYLE = Automatic;
309 | CURRENT_PROJECT_VERSION = 8;
310 | DEFINES_MODULE = YES;
311 | DEVELOPMENT_TEAM = CX6AZ34SLQ;
312 | DYLIB_COMPATIBILITY_VERSION = 1;
313 | DYLIB_CURRENT_VERSION = 1;
314 | DYLIB_INSTALL_NAME_BASE = "@rpath";
315 | GENERATE_INFOPLIST_FILE = YES;
316 | INFOPLIST_KEY_NSHumanReadableCopyright = "";
317 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
318 | LD_RUNPATH_SEARCH_PATHS = (
319 | "$(inherited)",
320 | "@executable_path/Frameworks",
321 | "@loader_path/Frameworks",
322 | );
323 | MARKETING_VERSION = 0.6.1;
324 | PRODUCT_BUNDLE_IDENTIFIER = evilmartians.VFont;
325 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
326 | SKIP_INSTALL = YES;
327 | SWIFT_EMIT_LOC_STRINGS = YES;
328 | SWIFT_VERSION = 5.0;
329 | TARGETED_DEVICE_FAMILY = "1,2";
330 | };
331 | name = Release;
332 | };
333 | /* End XCBuildConfiguration section */
334 |
335 | /* Begin XCConfigurationList section */
336 | B084D62F280FE67D007D5DA5 /* Build configuration list for PBXProject "VFont" */ = {
337 | isa = XCConfigurationList;
338 | buildConfigurations = (
339 | B084D647280FE67D007D5DA5 /* Debug */,
340 | B084D648280FE67D007D5DA5 /* Release */,
341 | );
342 | defaultConfigurationIsVisible = 0;
343 | defaultConfigurationName = Release;
344 | };
345 | B084D649280FE67D007D5DA5 /* Build configuration list for PBXNativeTarget "VFont" */ = {
346 | isa = XCConfigurationList;
347 | buildConfigurations = (
348 | B084D64A280FE67D007D5DA5 /* Debug */,
349 | B084D64B280FE67D007D5DA5 /* Release */,
350 | );
351 | defaultConfigurationIsVisible = 0;
352 | defaultConfigurationName = Release;
353 | };
354 | /* End XCConfigurationList section */
355 | };
356 | rootObject = B084D62C280FE67D007D5DA5 /* Project object */;
357 | }
358 |
--------------------------------------------------------------------------------
/Example/VFontDemoSwiftUI/VFontDemoSwiftUI.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 55;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B01DBCFC2848CCE700BFBD55 /* LargeTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01DBCFB2848CCE700BFBD55 /* LargeTitleView.swift */; };
11 | B01DBCFF2848CEAF00BFBD55 /* OrientationInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01DBCFE2848CEAF00BFBD55 /* OrientationInfo.swift */; };
12 | B06F8949282BBBCC0052C7A7 /* VFontDemoSwiftUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B06F8948282BBBCC0052C7A7 /* VFontDemoSwiftUIApp.swift */; };
13 | B06F894B282BBBCC0052C7A7 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B06F894A282BBBCC0052C7A7 /* ContentView.swift */; };
14 | B06F894D282BBBCD0052C7A7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B06F894C282BBBCD0052C7A7 /* Assets.xcassets */; };
15 | B06F8950282BBBCD0052C7A7 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B06F894F282BBBCD0052C7A7 /* Preview Assets.xcassets */; };
16 | B06F8959282BBC330052C7A7 /* Martian Mono.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B06F8958282BBC300052C7A7 /* Martian Mono.ttf */; };
17 | B0BE5049282BBDFD007FE9FB /* VFont.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0BE5048282BBDFD007FE9FB /* VFont.framework */; };
18 | B0BE504A282BBDFD007FE9FB /* VFont.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B0BE5048282BBDFD007FE9FB /* VFont.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
19 | B0E75FB928476B5B00D7E903 /* DarkModeSwitcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E75FB828476B5B00D7E903 /* DarkModeSwitcher.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | B0BE504B282BBDFD007FE9FB /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | B0BE504A282BBDFD007FE9FB /* VFont.framework in Embed Frameworks */,
30 | );
31 | name = "Embed Frameworks";
32 | runOnlyForDeploymentPostprocessing = 0;
33 | };
34 | /* End PBXCopyFilesBuildPhase section */
35 |
36 | /* Begin PBXFileReference section */
37 | B01DBCFB2848CCE700BFBD55 /* LargeTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LargeTitleView.swift; sourceTree = ""; };
38 | B01DBCFE2848CEAF00BFBD55 /* OrientationInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrientationInfo.swift; sourceTree = ""; };
39 | B06F8945282BBBCC0052C7A7 /* VFontDemoSwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VFontDemoSwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; };
40 | B06F8948282BBBCC0052C7A7 /* VFontDemoSwiftUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VFontDemoSwiftUIApp.swift; sourceTree = ""; };
41 | B06F894A282BBBCC0052C7A7 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
42 | B06F894C282BBBCD0052C7A7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | B06F894F282BBBCD0052C7A7 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
44 | B06F8956282BBC290052C7A7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | B06F8958282BBC300052C7A7 /* Martian Mono.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Martian Mono.ttf"; sourceTree = ""; };
46 | B06F8963282BBC740052C7A7 /* VFont.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VFont.framework; sourceTree = BUILT_PRODUCTS_DIR; };
47 | B0BE5048282BBDFD007FE9FB /* VFont.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VFont.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48 | B0E75FB828476B5B00D7E903 /* DarkModeSwitcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DarkModeSwitcher.swift; sourceTree = ""; };
49 | /* End PBXFileReference section */
50 |
51 | /* Begin PBXFrameworksBuildPhase section */
52 | B06F8942282BBBCC0052C7A7 /* Frameworks */ = {
53 | isa = PBXFrameworksBuildPhase;
54 | buildActionMask = 2147483647;
55 | files = (
56 | B0BE5049282BBDFD007FE9FB /* VFont.framework in Frameworks */,
57 | );
58 | runOnlyForDeploymentPostprocessing = 0;
59 | };
60 | /* End PBXFrameworksBuildPhase section */
61 |
62 | /* Begin PBXGroup section */
63 | B01DBCFA2848CC5900BFBD55 /* Views */ = {
64 | isa = PBXGroup;
65 | children = (
66 | B01DBCFD2848CE8C00BFBD55 /* LargeTitle View */,
67 | B0E75FB828476B5B00D7E903 /* DarkModeSwitcher.swift */,
68 | );
69 | path = Views;
70 | sourceTree = "";
71 | };
72 | B01DBCFD2848CE8C00BFBD55 /* LargeTitle View */ = {
73 | isa = PBXGroup;
74 | children = (
75 | B01DBCFB2848CCE700BFBD55 /* LargeTitleView.swift */,
76 | B01DBCFE2848CEAF00BFBD55 /* OrientationInfo.swift */,
77 | );
78 | path = "LargeTitle View";
79 | sourceTree = "";
80 | };
81 | B06F893C282BBBCC0052C7A7 = {
82 | isa = PBXGroup;
83 | children = (
84 | B01DBCFA2848CC5900BFBD55 /* Views */,
85 | B06F8958282BBC300052C7A7 /* Martian Mono.ttf */,
86 | B06F8956282BBC290052C7A7 /* Info.plist */,
87 | B06F8948282BBBCC0052C7A7 /* VFontDemoSwiftUIApp.swift */,
88 | B06F894A282BBBCC0052C7A7 /* ContentView.swift */,
89 | B06F894C282BBBCD0052C7A7 /* Assets.xcassets */,
90 | B06F894E282BBBCD0052C7A7 /* Preview Content */,
91 | B06F8946282BBBCC0052C7A7 /* Products */,
92 | B06F8962282BBC740052C7A7 /* Frameworks */,
93 | );
94 | sourceTree = "";
95 | };
96 | B06F8946282BBBCC0052C7A7 /* Products */ = {
97 | isa = PBXGroup;
98 | children = (
99 | B06F8945282BBBCC0052C7A7 /* VFontDemoSwiftUI.app */,
100 | );
101 | name = Products;
102 | sourceTree = "";
103 | };
104 | B06F894E282BBBCD0052C7A7 /* Preview Content */ = {
105 | isa = PBXGroup;
106 | children = (
107 | B06F894F282BBBCD0052C7A7 /* Preview Assets.xcassets */,
108 | );
109 | path = "Preview Content";
110 | sourceTree = "";
111 | };
112 | B06F8962282BBC740052C7A7 /* Frameworks */ = {
113 | isa = PBXGroup;
114 | children = (
115 | B0BE5048282BBDFD007FE9FB /* VFont.framework */,
116 | B06F8963282BBC740052C7A7 /* VFont.framework */,
117 | );
118 | name = Frameworks;
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | B06F8944282BBBCC0052C7A7 /* VFontDemoSwiftUI */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = B06F8953282BBBCD0052C7A7 /* Build configuration list for PBXNativeTarget "VFontDemoSwiftUI" */;
127 | buildPhases = (
128 | B06F8941282BBBCC0052C7A7 /* Sources */,
129 | B06F8942282BBBCC0052C7A7 /* Frameworks */,
130 | B06F8943282BBBCC0052C7A7 /* Resources */,
131 | B0BE504B282BBDFD007FE9FB /* Embed Frameworks */,
132 | );
133 | buildRules = (
134 | );
135 | dependencies = (
136 | );
137 | name = VFontDemoSwiftUI;
138 | productName = VFontDemoSwiftUI;
139 | productReference = B06F8945282BBBCC0052C7A7 /* VFontDemoSwiftUI.app */;
140 | productType = "com.apple.product-type.application";
141 | };
142 | /* End PBXNativeTarget section */
143 |
144 | /* Begin PBXProject section */
145 | B06F893D282BBBCC0052C7A7 /* Project object */ = {
146 | isa = PBXProject;
147 | attributes = {
148 | BuildIndependentTargetsInParallel = 1;
149 | LastSwiftUpdateCheck = 1330;
150 | LastUpgradeCheck = 1330;
151 | TargetAttributes = {
152 | B06F8944282BBBCC0052C7A7 = {
153 | CreatedOnToolsVersion = 13.3;
154 | };
155 | };
156 | };
157 | buildConfigurationList = B06F8940282BBBCC0052C7A7 /* Build configuration list for PBXProject "VFontDemoSwiftUI" */;
158 | compatibilityVersion = "Xcode 13.0";
159 | developmentRegion = en;
160 | hasScannedForEncodings = 0;
161 | knownRegions = (
162 | en,
163 | Base,
164 | );
165 | mainGroup = B06F893C282BBBCC0052C7A7;
166 | productRefGroup = B06F8946282BBBCC0052C7A7 /* Products */;
167 | projectDirPath = "";
168 | projectRoot = "";
169 | targets = (
170 | B06F8944282BBBCC0052C7A7 /* VFontDemoSwiftUI */,
171 | );
172 | };
173 | /* End PBXProject section */
174 |
175 | /* Begin PBXResourcesBuildPhase section */
176 | B06F8943282BBBCC0052C7A7 /* Resources */ = {
177 | isa = PBXResourcesBuildPhase;
178 | buildActionMask = 2147483647;
179 | files = (
180 | B06F8950282BBBCD0052C7A7 /* Preview Assets.xcassets in Resources */,
181 | B06F8959282BBC330052C7A7 /* Martian Mono.ttf in Resources */,
182 | B06F894D282BBBCD0052C7A7 /* Assets.xcassets in Resources */,
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | };
186 | /* End PBXResourcesBuildPhase section */
187 |
188 | /* Begin PBXSourcesBuildPhase section */
189 | B06F8941282BBBCC0052C7A7 /* Sources */ = {
190 | isa = PBXSourcesBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | B06F894B282BBBCC0052C7A7 /* ContentView.swift in Sources */,
194 | B0E75FB928476B5B00D7E903 /* DarkModeSwitcher.swift in Sources */,
195 | B06F8949282BBBCC0052C7A7 /* VFontDemoSwiftUIApp.swift in Sources */,
196 | B01DBCFC2848CCE700BFBD55 /* LargeTitleView.swift in Sources */,
197 | B01DBCFF2848CEAF00BFBD55 /* OrientationInfo.swift in Sources */,
198 | );
199 | runOnlyForDeploymentPostprocessing = 0;
200 | };
201 | /* End PBXSourcesBuildPhase section */
202 |
203 | /* Begin XCBuildConfiguration section */
204 | B06F8951282BBBCD0052C7A7 /* Debug */ = {
205 | isa = XCBuildConfiguration;
206 | buildSettings = {
207 | ALWAYS_SEARCH_USER_PATHS = NO;
208 | CLANG_ANALYZER_NONNULL = YES;
209 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
210 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
211 | CLANG_ENABLE_MODULES = YES;
212 | CLANG_ENABLE_OBJC_ARC = YES;
213 | CLANG_ENABLE_OBJC_WEAK = YES;
214 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
215 | CLANG_WARN_BOOL_CONVERSION = YES;
216 | CLANG_WARN_COMMA = YES;
217 | CLANG_WARN_CONSTANT_CONVERSION = YES;
218 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
219 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
220 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
221 | CLANG_WARN_EMPTY_BODY = YES;
222 | CLANG_WARN_ENUM_CONVERSION = YES;
223 | CLANG_WARN_INFINITE_RECURSION = YES;
224 | CLANG_WARN_INT_CONVERSION = YES;
225 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
226 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
227 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
228 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
229 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
230 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
231 | CLANG_WARN_STRICT_PROTOTYPES = YES;
232 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
233 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
234 | CLANG_WARN_UNREACHABLE_CODE = YES;
235 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
236 | COPY_PHASE_STRIP = NO;
237 | DEBUG_INFORMATION_FORMAT = dwarf;
238 | ENABLE_STRICT_OBJC_MSGSEND = YES;
239 | ENABLE_TESTABILITY = YES;
240 | GCC_C_LANGUAGE_STANDARD = gnu11;
241 | GCC_DYNAMIC_NO_PIC = NO;
242 | GCC_NO_COMMON_BLOCKS = YES;
243 | GCC_OPTIMIZATION_LEVEL = 0;
244 | GCC_PREPROCESSOR_DEFINITIONS = (
245 | "DEBUG=1",
246 | "$(inherited)",
247 | );
248 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
249 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
250 | GCC_WARN_UNDECLARED_SELECTOR = YES;
251 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
252 | GCC_WARN_UNUSED_FUNCTION = YES;
253 | GCC_WARN_UNUSED_VARIABLE = YES;
254 | IPHONEOS_DEPLOYMENT_TARGET = 15.4;
255 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
256 | MTL_FAST_MATH = YES;
257 | ONLY_ACTIVE_ARCH = YES;
258 | SDKROOT = iphoneos;
259 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
260 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
261 | };
262 | name = Debug;
263 | };
264 | B06F8952282BBBCD0052C7A7 /* Release */ = {
265 | isa = XCBuildConfiguration;
266 | buildSettings = {
267 | ALWAYS_SEARCH_USER_PATHS = NO;
268 | CLANG_ANALYZER_NONNULL = YES;
269 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
271 | CLANG_ENABLE_MODULES = YES;
272 | CLANG_ENABLE_OBJC_ARC = YES;
273 | CLANG_ENABLE_OBJC_WEAK = YES;
274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
275 | CLANG_WARN_BOOL_CONVERSION = YES;
276 | CLANG_WARN_COMMA = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
279 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
280 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
281 | CLANG_WARN_EMPTY_BODY = YES;
282 | CLANG_WARN_ENUM_CONVERSION = YES;
283 | CLANG_WARN_INFINITE_RECURSION = YES;
284 | CLANG_WARN_INT_CONVERSION = YES;
285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
286 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
287 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
288 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
289 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
290 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
291 | CLANG_WARN_STRICT_PROTOTYPES = YES;
292 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
293 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
294 | CLANG_WARN_UNREACHABLE_CODE = YES;
295 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
296 | COPY_PHASE_STRIP = NO;
297 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
298 | ENABLE_NS_ASSERTIONS = NO;
299 | ENABLE_STRICT_OBJC_MSGSEND = YES;
300 | GCC_C_LANGUAGE_STANDARD = gnu11;
301 | GCC_NO_COMMON_BLOCKS = YES;
302 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
303 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
304 | GCC_WARN_UNDECLARED_SELECTOR = YES;
305 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
306 | GCC_WARN_UNUSED_FUNCTION = YES;
307 | GCC_WARN_UNUSED_VARIABLE = YES;
308 | IPHONEOS_DEPLOYMENT_TARGET = 15.4;
309 | MTL_ENABLE_DEBUG_INFO = NO;
310 | MTL_FAST_MATH = YES;
311 | SDKROOT = iphoneos;
312 | SWIFT_COMPILATION_MODE = wholemodule;
313 | SWIFT_OPTIMIZATION_LEVEL = "-O";
314 | VALIDATE_PRODUCT = YES;
315 | };
316 | name = Release;
317 | };
318 | B06F8954282BBBCD0052C7A7 /* Debug */ = {
319 | isa = XCBuildConfiguration;
320 | buildSettings = {
321 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
322 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
323 | CODE_SIGN_STYLE = Automatic;
324 | CURRENT_PROJECT_VERSION = 1;
325 | DEVELOPMENT_ASSET_PATHS = "\"Preview Content\"";
326 | DEVELOPMENT_TEAM = CX6AZ34SLQ;
327 | ENABLE_PREVIEWS = YES;
328 | GENERATE_INFOPLIST_FILE = YES;
329 | INFOPLIST_FILE = Info.plist;
330 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
331 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
332 | INFOPLIST_KEY_UILaunchScreen_Generation = YES;
333 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
334 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
335 | IPHONEOS_DEPLOYMENT_TARGET = 14.0;
336 | LD_RUNPATH_SEARCH_PATHS = (
337 | "$(inherited)",
338 | "@executable_path/Frameworks",
339 | );
340 | MARKETING_VERSION = 1.0;
341 | PRODUCT_BUNDLE_IDENTIFIER = evilmartians.VFontDemoSwiftUI;
342 | PRODUCT_NAME = "$(TARGET_NAME)";
343 | SWIFT_EMIT_LOC_STRINGS = YES;
344 | SWIFT_VERSION = 5.0;
345 | TARGETED_DEVICE_FAMILY = "1,2";
346 | };
347 | name = Debug;
348 | };
349 | B06F8955282BBBCD0052C7A7 /* Release */ = {
350 | isa = XCBuildConfiguration;
351 | buildSettings = {
352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
353 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
354 | CODE_SIGN_STYLE = Automatic;
355 | CURRENT_PROJECT_VERSION = 1;
356 | DEVELOPMENT_ASSET_PATHS = "\"Preview Content\"";
357 | DEVELOPMENT_TEAM = CX6AZ34SLQ;
358 | ENABLE_PREVIEWS = YES;
359 | GENERATE_INFOPLIST_FILE = YES;
360 | INFOPLIST_FILE = Info.plist;
361 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
362 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
363 | INFOPLIST_KEY_UILaunchScreen_Generation = YES;
364 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
365 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
366 | IPHONEOS_DEPLOYMENT_TARGET = 14.0;
367 | LD_RUNPATH_SEARCH_PATHS = (
368 | "$(inherited)",
369 | "@executable_path/Frameworks",
370 | );
371 | MARKETING_VERSION = 1.0;
372 | PRODUCT_BUNDLE_IDENTIFIER = evilmartians.VFontDemoSwiftUI;
373 | PRODUCT_NAME = "$(TARGET_NAME)";
374 | SWIFT_EMIT_LOC_STRINGS = YES;
375 | SWIFT_VERSION = 5.0;
376 | TARGETED_DEVICE_FAMILY = "1,2";
377 | };
378 | name = Release;
379 | };
380 | /* End XCBuildConfiguration section */
381 |
382 | /* Begin XCConfigurationList section */
383 | B06F8940282BBBCC0052C7A7 /* Build configuration list for PBXProject "VFontDemoSwiftUI" */ = {
384 | isa = XCConfigurationList;
385 | buildConfigurations = (
386 | B06F8951282BBBCD0052C7A7 /* Debug */,
387 | B06F8952282BBBCD0052C7A7 /* Release */,
388 | );
389 | defaultConfigurationIsVisible = 0;
390 | defaultConfigurationName = Release;
391 | };
392 | B06F8953282BBBCD0052C7A7 /* Build configuration list for PBXNativeTarget "VFontDemoSwiftUI" */ = {
393 | isa = XCConfigurationList;
394 | buildConfigurations = (
395 | B06F8954282BBBCD0052C7A7 /* Debug */,
396 | B06F8955282BBBCD0052C7A7 /* Release */,
397 | );
398 | defaultConfigurationIsVisible = 0;
399 | defaultConfigurationName = Release;
400 | };
401 | /* End XCConfigurationList section */
402 | };
403 | rootObject = B06F893D282BBBCC0052C7A7 /* Project object */;
404 | }
405 |
--------------------------------------------------------------------------------
/Example/VFontDemoUIKit/VFontDemoUIKit.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 55;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B022134D282BB9DA008F5E95 /* VFont.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B022134C282BB9C9008F5E95 /* VFont.framework */; };
11 | B022134E282BB9DA008F5E95 /* VFont.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B022134C282BB9C9008F5E95 /* VFont.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12 | B092295F282BB3110085DE53 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B092295E282BB3110085DE53 /* AppDelegate.swift */; };
13 | B0922961282BB3110085DE53 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0922960282BB3110085DE53 /* SceneDelegate.swift */; };
14 | B0922968282BB3110085DE53 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0922967282BB3110085DE53 /* Assets.xcassets */; };
15 | B092296B282BB3110085DE53 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0922969282BB3110085DE53 /* LaunchScreen.storyboard */; };
16 | B092297A282BB3B30085DE53 /* Uncut-Sans.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B0922974282BB3B30085DE53 /* Uncut-Sans.ttf */; };
17 | B092297B282BB3B30085DE53 /* Martian Mono.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B0922975282BB3B30085DE53 /* Martian Mono.ttf */; };
18 | B092297C282BB3B30085DE53 /* InfoPlistReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0922976282BB3B30085DE53 /* InfoPlistReader.swift */; };
19 | B092297D282BB3B30085DE53 /* Inter.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B0922977282BB3B30085DE53 /* Inter.ttf */; };
20 | B092297E282BB3B30085DE53 /* Zvin Serif.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B0922978282BB3B30085DE53 /* Zvin Serif.ttf */; };
21 | B092297F282BB3B30085DE53 /* Generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0922979282BB3B30085DE53 /* Generated.swift */; };
22 | B0922983282BB3E90085DE53 /* VFontViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0922980282BB3E90085DE53 /* VFontViewController.swift */; };
23 | B0922984282BB3E90085DE53 /* FontListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0922981282BB3E90085DE53 /* FontListViewController.swift */; };
24 | B0922987282BB4020085DE53 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B0922986282BB4020085DE53 /* Main.storyboard */; };
25 | B092298F282BB4080085DE53 /* FontRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0922989282BB4080085DE53 /* FontRow.swift */; };
26 | B0922990282BB4080085DE53 /* FontRow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B092298A282BB4080085DE53 /* FontRow.xib */; };
27 | B0922991282BB4080085DE53 /* AxisTagLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B092298B282BB4080085DE53 /* AxisTagLabel.swift */; };
28 | B0922992282BB4080085DE53 /* AxisRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B092298C282BB4080085DE53 /* AxisRow.swift */; };
29 | B0922993282BB4080085DE53 /* AxisRow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B092298D282BB4080085DE53 /* AxisRow.xib */; };
30 | B0922994282BB4080085DE53 /* PaddingLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B092298E282BB4080085DE53 /* PaddingLabel.swift */; };
31 | /* End PBXBuildFile section */
32 |
33 | /* Begin PBXContainerItemProxy section */
34 | B022134B282BB9C9008F5E95 /* PBXContainerItemProxy */ = {
35 | isa = PBXContainerItemProxy;
36 | containerPortal = B0221347282BB9C9008F5E95 /* VFont.xcodeproj */;
37 | proxyType = 2;
38 | remoteGlobalIDString = B084D635280FE67D007D5DA5;
39 | remoteInfo = VFont;
40 | };
41 | /* End PBXContainerItemProxy section */
42 |
43 | /* Begin PBXCopyFilesBuildPhase section */
44 | B022134F282BB9DA008F5E95 /* Embed Frameworks */ = {
45 | isa = PBXCopyFilesBuildPhase;
46 | buildActionMask = 2147483647;
47 | dstPath = "";
48 | dstSubfolderSpec = 10;
49 | files = (
50 | B022134E282BB9DA008F5E95 /* VFont.framework in Embed Frameworks */,
51 | );
52 | name = "Embed Frameworks";
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXCopyFilesBuildPhase section */
56 |
57 | /* Begin PBXFileReference section */
58 | B0221345282BB8B0008F5E95 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
59 | B0221347282BB9C9008F5E95 /* VFont.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = VFont.xcodeproj; path = ../../Source/VFont.xcodeproj; sourceTree = ""; };
60 | B088B858282BB6ED00F246D6 /* VFont.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VFont.framework; sourceTree = BUILT_PRODUCTS_DIR; };
61 | B092295B282BB3110085DE53 /* VFontDemoUIKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VFontDemoUIKit.app; sourceTree = BUILT_PRODUCTS_DIR; };
62 | B092295E282BB3110085DE53 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
63 | B0922960282BB3110085DE53 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
64 | B0922967282BB3110085DE53 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
65 | B092296A282BB3110085DE53 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
66 | B0922974282BB3B30085DE53 /* Uncut-Sans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Uncut-Sans.ttf"; sourceTree = ""; };
67 | B0922975282BB3B30085DE53 /* Martian Mono.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Martian Mono.ttf"; sourceTree = ""; };
68 | B0922976282BB3B30085DE53 /* InfoPlistReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InfoPlistReader.swift; sourceTree = ""; };
69 | B0922977282BB3B30085DE53 /* Inter.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Inter.ttf; sourceTree = ""; };
70 | B0922978282BB3B30085DE53 /* Zvin Serif.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Zvin Serif.ttf"; sourceTree = ""; };
71 | B0922979282BB3B30085DE53 /* Generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Generated.swift; sourceTree = ""; };
72 | B0922980282BB3E90085DE53 /* VFontViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VFontViewController.swift; sourceTree = ""; };
73 | B0922981282BB3E90085DE53 /* FontListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FontListViewController.swift; sourceTree = ""; };
74 | B0922986282BB4020085DE53 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; };
75 | B0922989282BB4080085DE53 /* FontRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FontRow.swift; sourceTree = ""; };
76 | B092298A282BB4080085DE53 /* FontRow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FontRow.xib; sourceTree = ""; };
77 | B092298B282BB4080085DE53 /* AxisTagLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AxisTagLabel.swift; sourceTree = ""; };
78 | B092298C282BB4080085DE53 /* AxisRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AxisRow.swift; sourceTree = ""; };
79 | B092298D282BB4080085DE53 /* AxisRow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AxisRow.xib; sourceTree = ""; };
80 | B092298E282BB4080085DE53 /* PaddingLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaddingLabel.swift; sourceTree = ""; };
81 | /* End PBXFileReference section */
82 |
83 | /* Begin PBXFrameworksBuildPhase section */
84 | B0922958282BB3110085DE53 /* Frameworks */ = {
85 | isa = PBXFrameworksBuildPhase;
86 | buildActionMask = 2147483647;
87 | files = (
88 | B022134D282BB9DA008F5E95 /* VFont.framework in Frameworks */,
89 | );
90 | runOnlyForDeploymentPostprocessing = 0;
91 | };
92 | /* End PBXFrameworksBuildPhase section */
93 |
94 | /* Begin PBXGroup section */
95 | B0221348282BB9C9008F5E95 /* Products */ = {
96 | isa = PBXGroup;
97 | children = (
98 | B022134C282BB9C9008F5E95 /* VFont.framework */,
99 | );
100 | name = Products;
101 | sourceTree = "";
102 | };
103 | B088B800282BB53900F246D6 /* Frameworks */ = {
104 | isa = PBXGroup;
105 | children = (
106 | B0221347282BB9C9008F5E95 /* VFont.xcodeproj */,
107 | B088B858282BB6ED00F246D6 /* VFont.framework */,
108 | );
109 | name = Frameworks;
110 | sourceTree = "";
111 | };
112 | B0922952282BB3110085DE53 = {
113 | isa = PBXGroup;
114 | children = (
115 | B0922972282BB3830085DE53 /* Application */,
116 | B0922973282BB3B30085DE53 /* Fonts */,
117 | B0922988282BB4080085DE53 /* View */,
118 | B0922986282BB4020085DE53 /* Main.storyboard */,
119 | B0922981282BB3E90085DE53 /* FontListViewController.swift */,
120 | B0922980282BB3E90085DE53 /* VFontViewController.swift */,
121 | B092295C282BB3110085DE53 /* Products */,
122 | B088B800282BB53900F246D6 /* Frameworks */,
123 | );
124 | sourceTree = "";
125 | };
126 | B092295C282BB3110085DE53 /* Products */ = {
127 | isa = PBXGroup;
128 | children = (
129 | B092295B282BB3110085DE53 /* VFontDemoUIKit.app */,
130 | );
131 | name = Products;
132 | sourceTree = "";
133 | };
134 | B0922972282BB3830085DE53 /* Application */ = {
135 | isa = PBXGroup;
136 | children = (
137 | B0221345282BB8B0008F5E95 /* Info.plist */,
138 | B092295E282BB3110085DE53 /* AppDelegate.swift */,
139 | B0922960282BB3110085DE53 /* SceneDelegate.swift */,
140 | B0922967282BB3110085DE53 /* Assets.xcassets */,
141 | B0922969282BB3110085DE53 /* LaunchScreen.storyboard */,
142 | );
143 | path = Application;
144 | sourceTree = "";
145 | };
146 | B0922973282BB3B30085DE53 /* Fonts */ = {
147 | isa = PBXGroup;
148 | children = (
149 | B0922974282BB3B30085DE53 /* Uncut-Sans.ttf */,
150 | B0922975282BB3B30085DE53 /* Martian Mono.ttf */,
151 | B0922977282BB3B30085DE53 /* Inter.ttf */,
152 | B0922978282BB3B30085DE53 /* Zvin Serif.ttf */,
153 | B0922979282BB3B30085DE53 /* Generated.swift */,
154 | B0922976282BB3B30085DE53 /* InfoPlistReader.swift */,
155 | );
156 | path = Fonts;
157 | sourceTree = "";
158 | };
159 | B0922988282BB4080085DE53 /* View */ = {
160 | isa = PBXGroup;
161 | children = (
162 | B0922989282BB4080085DE53 /* FontRow.swift */,
163 | B092298A282BB4080085DE53 /* FontRow.xib */,
164 | B092298B282BB4080085DE53 /* AxisTagLabel.swift */,
165 | B092298C282BB4080085DE53 /* AxisRow.swift */,
166 | B092298D282BB4080085DE53 /* AxisRow.xib */,
167 | B092298E282BB4080085DE53 /* PaddingLabel.swift */,
168 | );
169 | path = View;
170 | sourceTree = "";
171 | };
172 | /* End PBXGroup section */
173 |
174 | /* Begin PBXNativeTarget section */
175 | B092295A282BB3110085DE53 /* VFontDemoUIKit */ = {
176 | isa = PBXNativeTarget;
177 | buildConfigurationList = B092296F282BB3110085DE53 /* Build configuration list for PBXNativeTarget "VFontDemoUIKit" */;
178 | buildPhases = (
179 | B0922957282BB3110085DE53 /* Sources */,
180 | B0922958282BB3110085DE53 /* Frameworks */,
181 | B0922959282BB3110085DE53 /* Resources */,
182 | B022134F282BB9DA008F5E95 /* Embed Frameworks */,
183 | );
184 | buildRules = (
185 | );
186 | dependencies = (
187 | );
188 | name = VFontDemoUIKit;
189 | productName = VFontDemoUIKit;
190 | productReference = B092295B282BB3110085DE53 /* VFontDemoUIKit.app */;
191 | productType = "com.apple.product-type.application";
192 | };
193 | /* End PBXNativeTarget section */
194 |
195 | /* Begin PBXProject section */
196 | B0922953282BB3110085DE53 /* Project object */ = {
197 | isa = PBXProject;
198 | attributes = {
199 | BuildIndependentTargetsInParallel = 1;
200 | LastSwiftUpdateCheck = 1330;
201 | LastUpgradeCheck = 1330;
202 | TargetAttributes = {
203 | B092295A282BB3110085DE53 = {
204 | CreatedOnToolsVersion = 13.3;
205 | };
206 | };
207 | };
208 | buildConfigurationList = B0922956282BB3110085DE53 /* Build configuration list for PBXProject "VFontDemoUIKit" */;
209 | compatibilityVersion = "Xcode 13.0";
210 | developmentRegion = en;
211 | hasScannedForEncodings = 0;
212 | knownRegions = (
213 | en,
214 | Base,
215 | );
216 | mainGroup = B0922952282BB3110085DE53;
217 | productRefGroup = B092295C282BB3110085DE53 /* Products */;
218 | projectDirPath = "";
219 | projectReferences = (
220 | {
221 | ProductGroup = B0221348282BB9C9008F5E95 /* Products */;
222 | ProjectRef = B0221347282BB9C9008F5E95 /* VFont.xcodeproj */;
223 | },
224 | );
225 | projectRoot = "";
226 | targets = (
227 | B092295A282BB3110085DE53 /* VFontDemoUIKit */,
228 | );
229 | };
230 | /* End PBXProject section */
231 |
232 | /* Begin PBXReferenceProxy section */
233 | B022134C282BB9C9008F5E95 /* VFont.framework */ = {
234 | isa = PBXReferenceProxy;
235 | fileType = wrapper.framework;
236 | path = VFont.framework;
237 | remoteRef = B022134B282BB9C9008F5E95 /* PBXContainerItemProxy */;
238 | sourceTree = BUILT_PRODUCTS_DIR;
239 | };
240 | /* End PBXReferenceProxy section */
241 |
242 | /* Begin PBXResourcesBuildPhase section */
243 | B0922959282BB3110085DE53 /* Resources */ = {
244 | isa = PBXResourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | B092297B282BB3B30085DE53 /* Martian Mono.ttf in Resources */,
248 | B092296B282BB3110085DE53 /* LaunchScreen.storyboard in Resources */,
249 | B0922987282BB4020085DE53 /* Main.storyboard in Resources */,
250 | B0922968282BB3110085DE53 /* Assets.xcassets in Resources */,
251 | B0922990282BB4080085DE53 /* FontRow.xib in Resources */,
252 | B092297D282BB3B30085DE53 /* Inter.ttf in Resources */,
253 | B092297E282BB3B30085DE53 /* Zvin Serif.ttf in Resources */,
254 | B092297A282BB3B30085DE53 /* Uncut-Sans.ttf in Resources */,
255 | B0922993282BB4080085DE53 /* AxisRow.xib in Resources */,
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | /* End PBXResourcesBuildPhase section */
260 |
261 | /* Begin PBXSourcesBuildPhase section */
262 | B0922957282BB3110085DE53 /* Sources */ = {
263 | isa = PBXSourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | B0922992282BB4080085DE53 /* AxisRow.swift in Sources */,
267 | B092295F282BB3110085DE53 /* AppDelegate.swift in Sources */,
268 | B0922983282BB3E90085DE53 /* VFontViewController.swift in Sources */,
269 | B0922961282BB3110085DE53 /* SceneDelegate.swift in Sources */,
270 | B092297F282BB3B30085DE53 /* Generated.swift in Sources */,
271 | B0922984282BB3E90085DE53 /* FontListViewController.swift in Sources */,
272 | B0922994282BB4080085DE53 /* PaddingLabel.swift in Sources */,
273 | B092297C282BB3B30085DE53 /* InfoPlistReader.swift in Sources */,
274 | B0922991282BB4080085DE53 /* AxisTagLabel.swift in Sources */,
275 | B092298F282BB4080085DE53 /* FontRow.swift in Sources */,
276 | );
277 | runOnlyForDeploymentPostprocessing = 0;
278 | };
279 | /* End PBXSourcesBuildPhase section */
280 |
281 | /* Begin PBXVariantGroup section */
282 | B0922969282BB3110085DE53 /* LaunchScreen.storyboard */ = {
283 | isa = PBXVariantGroup;
284 | children = (
285 | B092296A282BB3110085DE53 /* Base */,
286 | );
287 | name = LaunchScreen.storyboard;
288 | sourceTree = "";
289 | };
290 | /* End PBXVariantGroup section */
291 |
292 | /* Begin XCBuildConfiguration section */
293 | B092296D282BB3110085DE53 /* Debug */ = {
294 | isa = XCBuildConfiguration;
295 | buildSettings = {
296 | ALWAYS_SEARCH_USER_PATHS = NO;
297 | CLANG_ANALYZER_NONNULL = YES;
298 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
299 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
300 | CLANG_ENABLE_MODULES = YES;
301 | CLANG_ENABLE_OBJC_ARC = YES;
302 | CLANG_ENABLE_OBJC_WEAK = YES;
303 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
304 | CLANG_WARN_BOOL_CONVERSION = YES;
305 | CLANG_WARN_COMMA = YES;
306 | CLANG_WARN_CONSTANT_CONVERSION = YES;
307 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
308 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
309 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
310 | CLANG_WARN_EMPTY_BODY = YES;
311 | CLANG_WARN_ENUM_CONVERSION = YES;
312 | CLANG_WARN_INFINITE_RECURSION = YES;
313 | CLANG_WARN_INT_CONVERSION = YES;
314 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
315 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
316 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
317 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
318 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
319 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
320 | CLANG_WARN_STRICT_PROTOTYPES = YES;
321 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
322 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
323 | CLANG_WARN_UNREACHABLE_CODE = YES;
324 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
325 | COPY_PHASE_STRIP = NO;
326 | DEBUG_INFORMATION_FORMAT = dwarf;
327 | ENABLE_STRICT_OBJC_MSGSEND = YES;
328 | ENABLE_TESTABILITY = YES;
329 | GCC_C_LANGUAGE_STANDARD = gnu11;
330 | GCC_DYNAMIC_NO_PIC = NO;
331 | GCC_NO_COMMON_BLOCKS = YES;
332 | GCC_OPTIMIZATION_LEVEL = 0;
333 | GCC_PREPROCESSOR_DEFINITIONS = (
334 | "DEBUG=1",
335 | "$(inherited)",
336 | );
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 15.4;
344 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
345 | MTL_FAST_MATH = YES;
346 | ONLY_ACTIVE_ARCH = YES;
347 | SDKROOT = iphoneos;
348 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
349 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
350 | };
351 | name = Debug;
352 | };
353 | B092296E282BB3110085DE53 /* Release */ = {
354 | isa = XCBuildConfiguration;
355 | buildSettings = {
356 | ALWAYS_SEARCH_USER_PATHS = NO;
357 | CLANG_ANALYZER_NONNULL = YES;
358 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
359 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
360 | CLANG_ENABLE_MODULES = YES;
361 | CLANG_ENABLE_OBJC_ARC = YES;
362 | CLANG_ENABLE_OBJC_WEAK = YES;
363 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
364 | CLANG_WARN_BOOL_CONVERSION = YES;
365 | CLANG_WARN_COMMA = YES;
366 | CLANG_WARN_CONSTANT_CONVERSION = YES;
367 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
368 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
369 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
370 | CLANG_WARN_EMPTY_BODY = YES;
371 | CLANG_WARN_ENUM_CONVERSION = YES;
372 | CLANG_WARN_INFINITE_RECURSION = YES;
373 | CLANG_WARN_INT_CONVERSION = YES;
374 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
375 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
376 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
377 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
378 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
379 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
380 | CLANG_WARN_STRICT_PROTOTYPES = YES;
381 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
382 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
383 | CLANG_WARN_UNREACHABLE_CODE = YES;
384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
385 | COPY_PHASE_STRIP = NO;
386 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
387 | ENABLE_NS_ASSERTIONS = NO;
388 | ENABLE_STRICT_OBJC_MSGSEND = YES;
389 | GCC_C_LANGUAGE_STANDARD = gnu11;
390 | GCC_NO_COMMON_BLOCKS = YES;
391 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
392 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
393 | GCC_WARN_UNDECLARED_SELECTOR = YES;
394 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
395 | GCC_WARN_UNUSED_FUNCTION = YES;
396 | GCC_WARN_UNUSED_VARIABLE = YES;
397 | IPHONEOS_DEPLOYMENT_TARGET = 15.4;
398 | MTL_ENABLE_DEBUG_INFO = NO;
399 | MTL_FAST_MATH = YES;
400 | SDKROOT = iphoneos;
401 | SWIFT_COMPILATION_MODE = wholemodule;
402 | SWIFT_OPTIMIZATION_LEVEL = "-O";
403 | VALIDATE_PRODUCT = YES;
404 | };
405 | name = Release;
406 | };
407 | B0922970282BB3110085DE53 /* Debug */ = {
408 | isa = XCBuildConfiguration;
409 | buildSettings = {
410 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
411 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
412 | CODE_SIGN_STYLE = Automatic;
413 | CURRENT_PROJECT_VERSION = 1;
414 | DEVELOPMENT_TEAM = CX6AZ34SLQ;
415 | GENERATE_INFOPLIST_FILE = YES;
416 | INFOPLIST_FILE = Application/Info.plist;
417 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
418 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
419 | INFOPLIST_KEY_UIMainStoryboardFile = Main;
420 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
421 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
422 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
423 | LD_RUNPATH_SEARCH_PATHS = (
424 | "$(inherited)",
425 | "@executable_path/Frameworks",
426 | );
427 | MARKETING_VERSION = 1.0;
428 | PRODUCT_BUNDLE_IDENTIFIER = evilmartians.VFontDemoUIKit;
429 | PRODUCT_NAME = "$(TARGET_NAME)";
430 | SWIFT_EMIT_LOC_STRINGS = YES;
431 | SWIFT_VERSION = 5.0;
432 | TARGETED_DEVICE_FAMILY = "1,2";
433 | };
434 | name = Debug;
435 | };
436 | B0922971282BB3110085DE53 /* Release */ = {
437 | isa = XCBuildConfiguration;
438 | buildSettings = {
439 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
440 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
441 | CODE_SIGN_STYLE = Automatic;
442 | CURRENT_PROJECT_VERSION = 1;
443 | DEVELOPMENT_TEAM = CX6AZ34SLQ;
444 | GENERATE_INFOPLIST_FILE = YES;
445 | INFOPLIST_FILE = Application/Info.plist;
446 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
447 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
448 | INFOPLIST_KEY_UIMainStoryboardFile = Main;
449 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
450 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
451 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
452 | LD_RUNPATH_SEARCH_PATHS = (
453 | "$(inherited)",
454 | "@executable_path/Frameworks",
455 | );
456 | MARKETING_VERSION = 1.0;
457 | PRODUCT_BUNDLE_IDENTIFIER = evilmartians.VFontDemoUIKit;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_EMIT_LOC_STRINGS = YES;
460 | SWIFT_VERSION = 5.0;
461 | TARGETED_DEVICE_FAMILY = "1,2";
462 | };
463 | name = Release;
464 | };
465 | /* End XCBuildConfiguration section */
466 |
467 | /* Begin XCConfigurationList section */
468 | B0922956282BB3110085DE53 /* Build configuration list for PBXProject "VFontDemoUIKit" */ = {
469 | isa = XCConfigurationList;
470 | buildConfigurations = (
471 | B092296D282BB3110085DE53 /* Debug */,
472 | B092296E282BB3110085DE53 /* Release */,
473 | );
474 | defaultConfigurationIsVisible = 0;
475 | defaultConfigurationName = Release;
476 | };
477 | B092296F282BB3110085DE53 /* Build configuration list for PBXNativeTarget "VFontDemoUIKit" */ = {
478 | isa = XCConfigurationList;
479 | buildConfigurations = (
480 | B0922970282BB3110085DE53 /* Debug */,
481 | B0922971282BB3110085DE53 /* Release */,
482 | );
483 | defaultConfigurationIsVisible = 0;
484 | defaultConfigurationName = Release;
485 | };
486 | /* End XCConfigurationList section */
487 | };
488 | rootObject = B0922953282BB3110085DE53 /* Project object */;
489 | }
490 |
--------------------------------------------------------------------------------