├── .gitignore ├── .travis.yml ├── Assets ├── .gitkeep └── dynamic_type_demo.gif ├── CHANGELOG.md ├── Examples ├── Shared │ └── Fonts.swift ├── Swash Examples.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ ├── iOS Example.xcscheme │ │ ├── tvOS Example.xcscheme │ │ └── watchOS Example.xcscheme ├── iOS │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift ├── tvOS │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── App Icon & Top Shelf Image.brandassets │ │ │ ├── App Icon - App Store.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ ├── App Icon.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Top Shelf Image Wide.imageset │ │ │ │ └── Contents.json │ │ │ └── Top Shelf Image.imageset │ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── Launch Image.launchimage │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── watchOS Extension │ ├── Assets.xcassets │ │ ├── Complication.complicationset │ │ │ ├── Circular.imageset │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Extra Large.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Bezel.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Circular.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Corner.imageset │ │ │ │ └── Contents.json │ │ │ ├── Graphic Large Rectangular.imageset │ │ │ │ └── Contents.json │ │ │ ├── Modular.imageset │ │ │ │ └── Contents.json │ │ │ └── Utilitarian.imageset │ │ │ │ └── Contents.json │ │ └── Contents.json │ ├── ExtensionDelegate.swift │ ├── Info.plist │ └── InterfaceController.swift └── watchOS │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Interface.storyboard │ └── Info.plist ├── LICENSE ├── README.md ├── Source ├── CascadingFontProperties.swift ├── Default Sizes │ ├── DefaultSizes+iOS.swift │ ├── DefaultSizes+tvOS.swift │ └── DefaultSizes+watchOS.swift ├── Font.swift ├── Supporting Files │ ├── Info.plist │ └── Swash.h ├── SystemFont.swift └── Utils.swift ├── Swash.podspec ├── Swash.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── Swash iOS Tests.xcscheme │ ├── Swash iOS.xcscheme │ ├── Swash tvOS Tests.xcscheme │ ├── Swash tvOS.xcscheme │ └── Swash watchOS.xcscheme ├── Swash.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings └── Tests ├── CustomFontTests.swift ├── Info.plist ├── SystemFontTests.swift └── TestFonts.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Swash.xcworkspace -scheme Swash-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindgrub/Swash/9112c277f0b6f1620220835bfe765a12873aee78/Assets/.gitkeep -------------------------------------------------------------------------------- /Assets/dynamic_type_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mindgrub/Swash/9112c277f0b6f1620220835bfe765a12873aee78/Assets/dynamic_type_demo.gif -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Swash Change Log 2 | 3 | ## 4.0.0 4 | - Added font cascading support 5 | - Changed `boldTextMapping` from `static` to instance (breaking change) 6 | 7 | ## 3.1.0 8 | - Added bold text setting support 9 | 10 | ## 3.0.0 11 | - Font methods no longer return optionals, for practical reasons 12 | 13 | ## 2.0.1 14 | - Swift 5.0 15 | - Restructured the project files 16 | 17 | ## 2.0.0 18 | - Swift 4.2 19 | - Default values for `defaultSize` based on Apple’s Human Interface Guidelines 20 | - watchOS and tvOS support 21 | - Documentation 22 | - Unit Tests 23 | - Carthage Support 24 | 25 | ## 1.0.0 26 | - Initial release. 27 | -------------------------------------------------------------------------------- /Examples/Shared/Fonts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Fonts.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 2/6/18. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import Swash 10 | 11 | enum Avenir: String, Font { 12 | case book = "Avenir-Book" 13 | case heavy = "Avenir-Heavy" 14 | case blackOblique = "Avenir-BlackOblique" 15 | case black = "Avenir-Black" 16 | case lightOblique = "Avenir-LightOblique" 17 | case bookOblique = "Avenir-BookOblique" 18 | case light = "Avenir-Light" 19 | case medium = "Avenir-Medium" 20 | case heavyOblique = "Avenir-HeavyOblique" 21 | case oblique = "Avenir-Oblique" 22 | case roman = "Avenir-Roman" 23 | case mediumOblique = "Avenir-MediumOblique" 24 | 25 | var boldTextMapping: Avenir { 26 | switch self { 27 | case .light: return .book 28 | case .book: return .roman 29 | case .roman: return .medium 30 | case .medium: return .heavy 31 | case .heavy: return .black 32 | case .lightOblique: return .bookOblique 33 | case .bookOblique: return .mediumOblique 34 | case .mediumOblique: return .oblique 35 | case .oblique: return .heavyOblique 36 | case .heavyOblique: return .blackOblique 37 | case .blackOblique, .black: return self 38 | } 39 | } 40 | } 41 | 42 | enum Futura: String, Font { 43 | case bold = "Futura-Bold" 44 | case mediumItalic = "Futura-MediumItalic" 45 | case condensedExtraBold = "Futura-CondensedExtraBold" 46 | case condensedMedium = "Futura-CondensedMedium" 47 | case medium = "Futura-Medium" 48 | } 49 | 50 | enum Papyrus: String, Font { 51 | case condensed = "Papyrus-Condensed" 52 | case regular = "Papyrus" 53 | 54 | var cascadeList: [CascadingFontProperties] { 55 | [.init(Damascus.regular)] 56 | } 57 | } 58 | 59 | enum Damascus: String, Font { 60 | case bold = "DamascusBold" 61 | case light = "DamascusLight" 62 | case regular = "Damascus" 63 | case medium = "DamascusMedium" 64 | case semiBold = "DamascusSemiBold" 65 | } 66 | 67 | enum InvalidFont: String, Font { 68 | case doesNotExist = "😈" 69 | } 70 | -------------------------------------------------------------------------------- /Examples/Swash Examples.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2282AD7A2144748A00E20C3E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2282AD792144748A00E20C3E /* AppDelegate.swift */; }; 11 | 2282AD7C2144748A00E20C3E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2282AD7B2144748A00E20C3E /* ViewController.swift */; }; 12 | 2282AD7F2144748A00E20C3E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2282AD7D2144748A00E20C3E /* Main.storyboard */; }; 13 | 2282AD812144748C00E20C3E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2282AD802144748C00E20C3E /* Assets.xcassets */; }; 14 | 2282ADBA21449DCD00E20C3E /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829D74F8202A5D8C00DE3217 /* Fonts.swift */; }; 15 | 2282ADC22144A30500E20C3E /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2282ADC02144A30500E20C3E /* Interface.storyboard */; }; 16 | 2282ADC42144A30600E20C3E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2282ADC32144A30600E20C3E /* Assets.xcassets */; }; 17 | 2282ADCB2144A30600E20C3E /* watchOS Example Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2282ADCA2144A30600E20C3E /* watchOS Example Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 18 | 2282ADD02144A30600E20C3E /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2282ADCF2144A30600E20C3E /* InterfaceController.swift */; }; 19 | 2282ADD22144A30600E20C3E /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2282ADD12144A30600E20C3E /* ExtensionDelegate.swift */; }; 20 | 2282ADD42144A30600E20C3E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2282ADD32144A30600E20C3E /* Assets.xcassets */; }; 21 | 2282ADD82144A30600E20C3E /* watchOS Example.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 2282ADBE2144A30500E20C3E /* watchOS Example.app */; }; 22 | 2282ADE12144A58B00E20C3E /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829D74F8202A5D8C00DE3217 /* Fonts.swift */; }; 23 | 22CA249623822FF000AA8743 /* Swash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC85224FF9E500316608 /* Swash.framework */; }; 24 | 22CA249723822FF000AA8743 /* Swash.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC85224FF9E500316608 /* Swash.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 25 | 22CA249E2382300D00AA8743 /* Swash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC89224FF9E500316608 /* Swash.framework */; }; 26 | 22CA249F2382300D00AA8743 /* Swash.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC89224FF9E500316608 /* Swash.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 27 | 22CA24A12382304800AA8743 /* Swash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC8D224FF9E500316608 /* Swash.framework */; }; 28 | 22CA24A22382304800AA8743 /* Swash.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC8D224FF9E500316608 /* Swash.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 29 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 30 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 31 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 32 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 33 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 34 | 829D74F9202A5D8C00DE3217 /* Fonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829D74F8202A5D8C00DE3217 /* Fonts.swift */; }; 35 | /* End PBXBuildFile section */ 36 | 37 | /* Begin PBXContainerItemProxy section */ 38 | 224BAC84224FF9E500316608 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 224BAC7C224FF9E500316608 /* Swash.xcodeproj */; 41 | proxyType = 2; 42 | remoteGlobalIDString = 224BAC03224F41F100316608; 43 | remoteInfo = "Swash iOS"; 44 | }; 45 | 224BAC86224FF9E500316608 /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 224BAC7C224FF9E500316608 /* Swash.xcodeproj */; 48 | proxyType = 2; 49 | remoteGlobalIDString = 224BAC0C224F41F200316608; 50 | remoteInfo = "Swash iOS Tests"; 51 | }; 52 | 224BAC88224FF9E500316608 /* PBXContainerItemProxy */ = { 53 | isa = PBXContainerItemProxy; 54 | containerPortal = 224BAC7C224FF9E500316608 /* Swash.xcodeproj */; 55 | proxyType = 2; 56 | remoteGlobalIDString = 224BAC42224FF35300316608; 57 | remoteInfo = "Swash tvOS"; 58 | }; 59 | 224BAC8A224FF9E500316608 /* PBXContainerItemProxy */ = { 60 | isa = PBXContainerItemProxy; 61 | containerPortal = 224BAC7C224FF9E500316608 /* Swash.xcodeproj */; 62 | proxyType = 2; 63 | remoteGlobalIDString = 224BAC4A224FF35400316608; 64 | remoteInfo = "Swash tvOS Tests"; 65 | }; 66 | 224BAC8C224FF9E500316608 /* PBXContainerItemProxy */ = { 67 | isa = PBXContainerItemProxy; 68 | containerPortal = 224BAC7C224FF9E500316608 /* Swash.xcodeproj */; 69 | proxyType = 2; 70 | remoteGlobalIDString = 224BAC67224FF62200316608; 71 | remoteInfo = "Swash watchOS"; 72 | }; 73 | 2282ADCC2144A30600E20C3E /* PBXContainerItemProxy */ = { 74 | isa = PBXContainerItemProxy; 75 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 76 | proxyType = 1; 77 | remoteGlobalIDString = 2282ADC92144A30600E20C3E; 78 | remoteInfo = "Swash_watchOS_Example Extension"; 79 | }; 80 | 2282ADD62144A30600E20C3E /* PBXContainerItemProxy */ = { 81 | isa = PBXContainerItemProxy; 82 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 83 | proxyType = 1; 84 | remoteGlobalIDString = 2282ADBD2144A30500E20C3E; 85 | remoteInfo = Swash_watchOS_Example; 86 | }; 87 | /* End PBXContainerItemProxy section */ 88 | 89 | /* Begin PBXCopyFilesBuildPhase section */ 90 | 2282ADDC2144A30600E20C3E /* Embed App Extensions */ = { 91 | isa = PBXCopyFilesBuildPhase; 92 | buildActionMask = 2147483647; 93 | dstPath = ""; 94 | dstSubfolderSpec = 13; 95 | files = ( 96 | 2282ADCB2144A30600E20C3E /* watchOS Example Extension.appex in Embed App Extensions */, 97 | ); 98 | name = "Embed App Extensions"; 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | 2282ADE02144A30600E20C3E /* Embed Watch Content */ = { 102 | isa = PBXCopyFilesBuildPhase; 103 | buildActionMask = 2147483647; 104 | dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; 105 | dstSubfolderSpec = 16; 106 | files = ( 107 | 2282ADD82144A30600E20C3E /* watchOS Example.app in Embed Watch Content */, 108 | ); 109 | name = "Embed Watch Content"; 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | 22CA249823822FF000AA8743 /* Embed Frameworks */ = { 113 | isa = PBXCopyFilesBuildPhase; 114 | buildActionMask = 2147483647; 115 | dstPath = ""; 116 | dstSubfolderSpec = 10; 117 | files = ( 118 | 22CA249723822FF000AA8743 /* Swash.framework in Embed Frameworks */, 119 | ); 120 | name = "Embed Frameworks"; 121 | runOnlyForDeploymentPostprocessing = 0; 122 | }; 123 | 22CA24A02382300D00AA8743 /* Embed Frameworks */ = { 124 | isa = PBXCopyFilesBuildPhase; 125 | buildActionMask = 2147483647; 126 | dstPath = ""; 127 | dstSubfolderSpec = 10; 128 | files = ( 129 | 22CA249F2382300D00AA8743 /* Swash.framework in Embed Frameworks */, 130 | ); 131 | name = "Embed Frameworks"; 132 | runOnlyForDeploymentPostprocessing = 0; 133 | }; 134 | 22CA24A32382304800AA8743 /* Embed Frameworks */ = { 135 | isa = PBXCopyFilesBuildPhase; 136 | buildActionMask = 2147483647; 137 | dstPath = ""; 138 | dstSubfolderSpec = 10; 139 | files = ( 140 | 22CA24A22382304800AA8743 /* Swash.framework in Embed Frameworks */, 141 | ); 142 | name = "Embed Frameworks"; 143 | runOnlyForDeploymentPostprocessing = 0; 144 | }; 145 | /* End PBXCopyFilesBuildPhase section */ 146 | 147 | /* Begin PBXFileReference section */ 148 | 224BAC7C224FF9E500316608 /* Swash.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Swash.xcodeproj; path = ../Swash.xcodeproj; sourceTree = ""; }; 149 | 2282AD772144748A00E20C3E /* tvOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tvOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 150 | 2282AD792144748A00E20C3E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 151 | 2282AD7B2144748A00E20C3E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 152 | 2282AD7E2144748A00E20C3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 153 | 2282AD802144748C00E20C3E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 154 | 2282AD822144748C00E20C3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 155 | 2282ADBE2144A30500E20C3E /* watchOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "watchOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 156 | 2282ADC12144A30500E20C3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 157 | 2282ADC32144A30600E20C3E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 158 | 2282ADC52144A30600E20C3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 159 | 2282ADCA2144A30600E20C3E /* watchOS Example Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "watchOS Example Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 160 | 2282ADCF2144A30600E20C3E /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; 161 | 2282ADD12144A30600E20C3E /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 162 | 2282ADD32144A30600E20C3E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 163 | 2282ADD52144A30600E20C3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 164 | 607FACD01AFB9204008FA782 /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 165 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 166 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 167 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 168 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 169 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 170 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 171 | 829D74F8202A5D8C00DE3217 /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = ""; }; 172 | /* End PBXFileReference section */ 173 | 174 | /* Begin PBXFrameworksBuildPhase section */ 175 | 2282AD742144748A00E20C3E /* Frameworks */ = { 176 | isa = PBXFrameworksBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | 22CA249E2382300D00AA8743 /* Swash.framework in Frameworks */, 180 | ); 181 | runOnlyForDeploymentPostprocessing = 0; 182 | }; 183 | 2282ADC72144A30600E20C3E /* Frameworks */ = { 184 | isa = PBXFrameworksBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | 22CA24A12382304800AA8743 /* Swash.framework in Frameworks */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | 44BE91A10EB606F038B5C3E9 /* Frameworks */ = { 192 | isa = PBXFrameworksBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 199 | isa = PBXFrameworksBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 22CA249623822FF000AA8743 /* Swash.framework in Frameworks */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXFrameworksBuildPhase section */ 207 | 208 | /* Begin PBXGroup section */ 209 | 224BAC7D224FF9E500316608 /* Products */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 224BAC85224FF9E500316608 /* Swash.framework */, 213 | 224BAC87224FF9E500316608 /* Swash iOS Tests.xctest */, 214 | 224BAC89224FF9E500316608 /* Swash.framework */, 215 | 224BAC8B224FF9E500316608 /* Swash tvOS Tests.xctest */, 216 | 224BAC8D224FF9E500316608 /* Swash.framework */, 217 | ); 218 | name = Products; 219 | sourceTree = ""; 220 | }; 221 | 224BAC94224FFB4300316608 /* Frameworks */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | ); 225 | name = Frameworks; 226 | sourceTree = ""; 227 | }; 228 | 2282AD782144748A00E20C3E /* tvOS */ = { 229 | isa = PBXGroup; 230 | children = ( 231 | 2282AD792144748A00E20C3E /* AppDelegate.swift */, 232 | 2282AD7B2144748A00E20C3E /* ViewController.swift */, 233 | 2282AD7D2144748A00E20C3E /* Main.storyboard */, 234 | 2282AD802144748C00E20C3E /* Assets.xcassets */, 235 | 2282AD822144748C00E20C3E /* Info.plist */, 236 | ); 237 | path = tvOS; 238 | sourceTree = ""; 239 | }; 240 | 2282ADBF2144A30500E20C3E /* watchOS */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 2282ADC02144A30500E20C3E /* Interface.storyboard */, 244 | 2282ADC32144A30600E20C3E /* Assets.xcassets */, 245 | 2282ADC52144A30600E20C3E /* Info.plist */, 246 | ); 247 | path = watchOS; 248 | sourceTree = ""; 249 | }; 250 | 2282ADCE2144A30600E20C3E /* watchOS Extension */ = { 251 | isa = PBXGroup; 252 | children = ( 253 | 2282ADCF2144A30600E20C3E /* InterfaceController.swift */, 254 | 2282ADD12144A30600E20C3E /* ExtensionDelegate.swift */, 255 | 2282ADD32144A30600E20C3E /* Assets.xcassets */, 256 | 2282ADD52144A30600E20C3E /* Info.plist */, 257 | ); 258 | path = "watchOS Extension"; 259 | sourceTree = ""; 260 | }; 261 | 22C82DBA21535E87009598C2 /* Shared */ = { 262 | isa = PBXGroup; 263 | children = ( 264 | 829D74F8202A5D8C00DE3217 /* Fonts.swift */, 265 | ); 266 | path = Shared; 267 | sourceTree = ""; 268 | }; 269 | 607FACC71AFB9204008FA782 = { 270 | isa = PBXGroup; 271 | children = ( 272 | 22C82DBA21535E87009598C2 /* Shared */, 273 | 607FACD21AFB9204008FA782 /* iOS */, 274 | 2282AD782144748A00E20C3E /* tvOS */, 275 | 2282ADBF2144A30500E20C3E /* watchOS */, 276 | 2282ADCE2144A30600E20C3E /* watchOS Extension */, 277 | 607FACD11AFB9204008FA782 /* Products */, 278 | 224BAC7C224FF9E500316608 /* Swash.xcodeproj */, 279 | 224BAC94224FFB4300316608 /* Frameworks */, 280 | ); 281 | sourceTree = ""; 282 | }; 283 | 607FACD11AFB9204008FA782 /* Products */ = { 284 | isa = PBXGroup; 285 | children = ( 286 | 607FACD01AFB9204008FA782 /* iOS Example.app */, 287 | 2282AD772144748A00E20C3E /* tvOS Example.app */, 288 | 2282ADBE2144A30500E20C3E /* watchOS Example.app */, 289 | 2282ADCA2144A30600E20C3E /* watchOS Example Extension.appex */, 290 | ); 291 | name = Products; 292 | sourceTree = ""; 293 | }; 294 | 607FACD21AFB9204008FA782 /* iOS */ = { 295 | isa = PBXGroup; 296 | children = ( 297 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 298 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 299 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 300 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 301 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 302 | 607FACD41AFB9204008FA782 /* Info.plist */, 303 | ); 304 | path = iOS; 305 | sourceTree = ""; 306 | }; 307 | /* End PBXGroup section */ 308 | 309 | /* Begin PBXNativeTarget section */ 310 | 2282AD762144748A00E20C3E /* tvOS Example */ = { 311 | isa = PBXNativeTarget; 312 | buildConfigurationList = 2282AD922144748C00E20C3E /* Build configuration list for PBXNativeTarget "tvOS Example" */; 313 | buildPhases = ( 314 | 2282AD732144748A00E20C3E /* Sources */, 315 | 2282AD742144748A00E20C3E /* Frameworks */, 316 | 2282AD752144748A00E20C3E /* Resources */, 317 | 22CA24A02382300D00AA8743 /* Embed Frameworks */, 318 | ); 319 | buildRules = ( 320 | ); 321 | dependencies = ( 322 | ); 323 | name = "tvOS Example"; 324 | productName = Swash_tvOS_Example; 325 | productReference = 2282AD772144748A00E20C3E /* tvOS Example.app */; 326 | productType = "com.apple.product-type.application"; 327 | }; 328 | 2282ADBD2144A30500E20C3E /* watchOS Example */ = { 329 | isa = PBXNativeTarget; 330 | buildConfigurationList = 2282ADDD2144A30600E20C3E /* Build configuration list for PBXNativeTarget "watchOS Example" */; 331 | buildPhases = ( 332 | 2282ADBC2144A30500E20C3E /* Resources */, 333 | 2282ADDC2144A30600E20C3E /* Embed App Extensions */, 334 | 44BE91A10EB606F038B5C3E9 /* Frameworks */, 335 | ); 336 | buildRules = ( 337 | ); 338 | dependencies = ( 339 | 2282ADCD2144A30600E20C3E /* PBXTargetDependency */, 340 | ); 341 | name = "watchOS Example"; 342 | productName = Swash_watchOS_Example; 343 | productReference = 2282ADBE2144A30500E20C3E /* watchOS Example.app */; 344 | productType = "com.apple.product-type.application.watchapp2"; 345 | }; 346 | 2282ADC92144A30600E20C3E /* watchOS Example Extension */ = { 347 | isa = PBXNativeTarget; 348 | buildConfigurationList = 2282ADD92144A30600E20C3E /* Build configuration list for PBXNativeTarget "watchOS Example Extension" */; 349 | buildPhases = ( 350 | 2282ADC62144A30600E20C3E /* Sources */, 351 | 2282ADC72144A30600E20C3E /* Frameworks */, 352 | 2282ADC82144A30600E20C3E /* Resources */, 353 | 22CA24A32382304800AA8743 /* Embed Frameworks */, 354 | ); 355 | buildRules = ( 356 | ); 357 | dependencies = ( 358 | ); 359 | name = "watchOS Example Extension"; 360 | productName = "Swash_watchOS_Example Extension"; 361 | productReference = 2282ADCA2144A30600E20C3E /* watchOS Example Extension.appex */; 362 | productType = "com.apple.product-type.watchkit2-extension"; 363 | }; 364 | 607FACCF1AFB9204008FA782 /* iOS Example */ = { 365 | isa = PBXNativeTarget; 366 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "iOS Example" */; 367 | buildPhases = ( 368 | 607FACCC1AFB9204008FA782 /* Sources */, 369 | 607FACCD1AFB9204008FA782 /* Frameworks */, 370 | 607FACCE1AFB9204008FA782 /* Resources */, 371 | 2282ADE02144A30600E20C3E /* Embed Watch Content */, 372 | 22CA249823822FF000AA8743 /* Embed Frameworks */, 373 | ); 374 | buildRules = ( 375 | ); 376 | dependencies = ( 377 | 2282ADD72144A30600E20C3E /* PBXTargetDependency */, 378 | ); 379 | name = "iOS Example"; 380 | productName = Swash; 381 | productReference = 607FACD01AFB9204008FA782 /* iOS Example.app */; 382 | productType = "com.apple.product-type.application"; 383 | }; 384 | /* End PBXNativeTarget section */ 385 | 386 | /* Begin PBXProject section */ 387 | 607FACC81AFB9204008FA782 /* Project object */ = { 388 | isa = PBXProject; 389 | attributes = { 390 | LastSwiftUpdateCheck = 1000; 391 | LastUpgradeCheck = 1020; 392 | ORGANIZATIONNAME = CocoaPods; 393 | TargetAttributes = { 394 | 2282AD762144748A00E20C3E = { 395 | CreatedOnToolsVersion = 10.0; 396 | ProvisioningStyle = Automatic; 397 | }; 398 | 2282ADBD2144A30500E20C3E = { 399 | CreatedOnToolsVersion = 10.0; 400 | ProvisioningStyle = Automatic; 401 | }; 402 | 2282ADC92144A30600E20C3E = { 403 | CreatedOnToolsVersion = 10.0; 404 | ProvisioningStyle = Automatic; 405 | }; 406 | 607FACCF1AFB9204008FA782 = { 407 | CreatedOnToolsVersion = 6.3.1; 408 | LastSwiftMigration = 0900; 409 | }; 410 | }; 411 | }; 412 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Swash Examples" */; 413 | compatibilityVersion = "Xcode 3.2"; 414 | developmentRegion = en; 415 | hasScannedForEncodings = 0; 416 | knownRegions = ( 417 | en, 418 | Base, 419 | ); 420 | mainGroup = 607FACC71AFB9204008FA782; 421 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 422 | projectDirPath = ""; 423 | projectReferences = ( 424 | { 425 | ProductGroup = 224BAC7D224FF9E500316608 /* Products */; 426 | ProjectRef = 224BAC7C224FF9E500316608 /* Swash.xcodeproj */; 427 | }, 428 | ); 429 | projectRoot = ""; 430 | targets = ( 431 | 607FACCF1AFB9204008FA782 /* iOS Example */, 432 | 2282AD762144748A00E20C3E /* tvOS Example */, 433 | 2282ADBD2144A30500E20C3E /* watchOS Example */, 434 | 2282ADC92144A30600E20C3E /* watchOS Example Extension */, 435 | ); 436 | }; 437 | /* End PBXProject section */ 438 | 439 | /* Begin PBXReferenceProxy section */ 440 | 224BAC85224FF9E500316608 /* Swash.framework */ = { 441 | isa = PBXReferenceProxy; 442 | fileType = wrapper.framework; 443 | path = Swash.framework; 444 | remoteRef = 224BAC84224FF9E500316608 /* PBXContainerItemProxy */; 445 | sourceTree = BUILT_PRODUCTS_DIR; 446 | }; 447 | 224BAC87224FF9E500316608 /* Swash iOS Tests.xctest */ = { 448 | isa = PBXReferenceProxy; 449 | fileType = wrapper.cfbundle; 450 | path = "Swash iOS Tests.xctest"; 451 | remoteRef = 224BAC86224FF9E500316608 /* PBXContainerItemProxy */; 452 | sourceTree = BUILT_PRODUCTS_DIR; 453 | }; 454 | 224BAC89224FF9E500316608 /* Swash.framework */ = { 455 | isa = PBXReferenceProxy; 456 | fileType = wrapper.framework; 457 | path = Swash.framework; 458 | remoteRef = 224BAC88224FF9E500316608 /* PBXContainerItemProxy */; 459 | sourceTree = BUILT_PRODUCTS_DIR; 460 | }; 461 | 224BAC8B224FF9E500316608 /* Swash tvOS Tests.xctest */ = { 462 | isa = PBXReferenceProxy; 463 | fileType = wrapper.cfbundle; 464 | path = "Swash tvOS Tests.xctest"; 465 | remoteRef = 224BAC8A224FF9E500316608 /* PBXContainerItemProxy */; 466 | sourceTree = BUILT_PRODUCTS_DIR; 467 | }; 468 | 224BAC8D224FF9E500316608 /* Swash.framework */ = { 469 | isa = PBXReferenceProxy; 470 | fileType = wrapper.framework; 471 | path = Swash.framework; 472 | remoteRef = 224BAC8C224FF9E500316608 /* PBXContainerItemProxy */; 473 | sourceTree = BUILT_PRODUCTS_DIR; 474 | }; 475 | /* End PBXReferenceProxy section */ 476 | 477 | /* Begin PBXResourcesBuildPhase section */ 478 | 2282AD752144748A00E20C3E /* Resources */ = { 479 | isa = PBXResourcesBuildPhase; 480 | buildActionMask = 2147483647; 481 | files = ( 482 | 2282AD812144748C00E20C3E /* Assets.xcassets in Resources */, 483 | 2282AD7F2144748A00E20C3E /* Main.storyboard in Resources */, 484 | ); 485 | runOnlyForDeploymentPostprocessing = 0; 486 | }; 487 | 2282ADBC2144A30500E20C3E /* Resources */ = { 488 | isa = PBXResourcesBuildPhase; 489 | buildActionMask = 2147483647; 490 | files = ( 491 | 2282ADC42144A30600E20C3E /* Assets.xcassets in Resources */, 492 | 2282ADC22144A30500E20C3E /* Interface.storyboard in Resources */, 493 | ); 494 | runOnlyForDeploymentPostprocessing = 0; 495 | }; 496 | 2282ADC82144A30600E20C3E /* Resources */ = { 497 | isa = PBXResourcesBuildPhase; 498 | buildActionMask = 2147483647; 499 | files = ( 500 | 2282ADD42144A30600E20C3E /* Assets.xcassets in Resources */, 501 | ); 502 | runOnlyForDeploymentPostprocessing = 0; 503 | }; 504 | 607FACCE1AFB9204008FA782 /* Resources */ = { 505 | isa = PBXResourcesBuildPhase; 506 | buildActionMask = 2147483647; 507 | files = ( 508 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 509 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 510 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 511 | ); 512 | runOnlyForDeploymentPostprocessing = 0; 513 | }; 514 | /* End PBXResourcesBuildPhase section */ 515 | 516 | /* Begin PBXSourcesBuildPhase section */ 517 | 2282AD732144748A00E20C3E /* Sources */ = { 518 | isa = PBXSourcesBuildPhase; 519 | buildActionMask = 2147483647; 520 | files = ( 521 | 2282AD7C2144748A00E20C3E /* ViewController.swift in Sources */, 522 | 2282ADBA21449DCD00E20C3E /* Fonts.swift in Sources */, 523 | 2282AD7A2144748A00E20C3E /* AppDelegate.swift in Sources */, 524 | ); 525 | runOnlyForDeploymentPostprocessing = 0; 526 | }; 527 | 2282ADC62144A30600E20C3E /* Sources */ = { 528 | isa = PBXSourcesBuildPhase; 529 | buildActionMask = 2147483647; 530 | files = ( 531 | 2282ADD22144A30600E20C3E /* ExtensionDelegate.swift in Sources */, 532 | 2282ADE12144A58B00E20C3E /* Fonts.swift in Sources */, 533 | 2282ADD02144A30600E20C3E /* InterfaceController.swift in Sources */, 534 | ); 535 | runOnlyForDeploymentPostprocessing = 0; 536 | }; 537 | 607FACCC1AFB9204008FA782 /* Sources */ = { 538 | isa = PBXSourcesBuildPhase; 539 | buildActionMask = 2147483647; 540 | files = ( 541 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 542 | 829D74F9202A5D8C00DE3217 /* Fonts.swift in Sources */, 543 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 544 | ); 545 | runOnlyForDeploymentPostprocessing = 0; 546 | }; 547 | /* End PBXSourcesBuildPhase section */ 548 | 549 | /* Begin PBXTargetDependency section */ 550 | 2282ADCD2144A30600E20C3E /* PBXTargetDependency */ = { 551 | isa = PBXTargetDependency; 552 | target = 2282ADC92144A30600E20C3E /* watchOS Example Extension */; 553 | targetProxy = 2282ADCC2144A30600E20C3E /* PBXContainerItemProxy */; 554 | }; 555 | 2282ADD72144A30600E20C3E /* PBXTargetDependency */ = { 556 | isa = PBXTargetDependency; 557 | target = 2282ADBD2144A30500E20C3E /* watchOS Example */; 558 | targetProxy = 2282ADD62144A30600E20C3E /* PBXContainerItemProxy */; 559 | }; 560 | /* End PBXTargetDependency section */ 561 | 562 | /* Begin PBXVariantGroup section */ 563 | 2282AD7D2144748A00E20C3E /* Main.storyboard */ = { 564 | isa = PBXVariantGroup; 565 | children = ( 566 | 2282AD7E2144748A00E20C3E /* Base */, 567 | ); 568 | name = Main.storyboard; 569 | sourceTree = ""; 570 | }; 571 | 2282ADC02144A30500E20C3E /* Interface.storyboard */ = { 572 | isa = PBXVariantGroup; 573 | children = ( 574 | 2282ADC12144A30500E20C3E /* Base */, 575 | ); 576 | name = Interface.storyboard; 577 | sourceTree = ""; 578 | }; 579 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 580 | isa = PBXVariantGroup; 581 | children = ( 582 | 607FACDA1AFB9204008FA782 /* Base */, 583 | ); 584 | name = Main.storyboard; 585 | sourceTree = ""; 586 | }; 587 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 588 | isa = PBXVariantGroup; 589 | children = ( 590 | 607FACDF1AFB9204008FA782 /* Base */, 591 | ); 592 | name = LaunchScreen.xib; 593 | sourceTree = ""; 594 | }; 595 | /* End PBXVariantGroup section */ 596 | 597 | /* Begin XCBuildConfiguration section */ 598 | 2282AD8E2144748C00E20C3E /* Debug */ = { 599 | isa = XCBuildConfiguration; 600 | buildSettings = { 601 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 602 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 603 | CLANG_ANALYZER_NONNULL = YES; 604 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 605 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 606 | CLANG_ENABLE_OBJC_WEAK = YES; 607 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 608 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 609 | CODE_SIGN_IDENTITY = "iPhone Developer"; 610 | CODE_SIGN_STYLE = Automatic; 611 | DEBUG_INFORMATION_FORMAT = dwarf; 612 | DEVELOPMENT_TEAM = ""; 613 | GCC_C_LANGUAGE_STANDARD = gnu11; 614 | INFOPLIST_FILE = tvOS/Info.plist; 615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 616 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 617 | MTL_FAST_MATH = YES; 618 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-tvOS-Example"; 619 | PRODUCT_NAME = "$(TARGET_NAME)"; 620 | PROVISIONING_PROFILE_SPECIFIER = ""; 621 | SDKROOT = appletvos; 622 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 623 | SWIFT_VERSION = 5.0; 624 | TARGETED_DEVICE_FAMILY = 3; 625 | TVOS_DEPLOYMENT_TARGET = 12.2; 626 | }; 627 | name = Debug; 628 | }; 629 | 2282AD8F2144748C00E20C3E /* Release */ = { 630 | isa = XCBuildConfiguration; 631 | buildSettings = { 632 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 633 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 634 | CLANG_ANALYZER_NONNULL = YES; 635 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 636 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 637 | CLANG_ENABLE_OBJC_WEAK = YES; 638 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 639 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 640 | CODE_SIGN_IDENTITY = "iPhone Developer"; 641 | CODE_SIGN_STYLE = Automatic; 642 | DEVELOPMENT_TEAM = ""; 643 | GCC_C_LANGUAGE_STANDARD = gnu11; 644 | INFOPLIST_FILE = tvOS/Info.plist; 645 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 646 | MTL_FAST_MATH = YES; 647 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-tvOS-Example"; 648 | PRODUCT_NAME = "$(TARGET_NAME)"; 649 | PROVISIONING_PROFILE_SPECIFIER = ""; 650 | SDKROOT = appletvos; 651 | SWIFT_VERSION = 5.0; 652 | TARGETED_DEVICE_FAMILY = 3; 653 | TVOS_DEPLOYMENT_TARGET = 12.2; 654 | }; 655 | name = Release; 656 | }; 657 | 2282ADDA2144A30600E20C3E /* Debug */ = { 658 | isa = XCBuildConfiguration; 659 | buildSettings = { 660 | ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; 661 | CLANG_ANALYZER_NONNULL = YES; 662 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 663 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 664 | CLANG_ENABLE_OBJC_WEAK = YES; 665 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 666 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 667 | CODE_SIGN_STYLE = Automatic; 668 | DEBUG_INFORMATION_FORMAT = dwarf; 669 | DEVELOPMENT_TEAM = ""; 670 | GCC_C_LANGUAGE_STANDARD = gnu11; 671 | INFOPLIST_FILE = "watchOS Extension/Info.plist"; 672 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 673 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 674 | MTL_FAST_MATH = YES; 675 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-iOS-Example.watchkitapp.watchkitextension"; 676 | PRODUCT_NAME = "${TARGET_NAME}"; 677 | SDKROOT = watchos; 678 | SKIP_INSTALL = YES; 679 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 680 | SWIFT_VERSION = 5.0; 681 | TARGETED_DEVICE_FAMILY = 4; 682 | WATCHOS_DEPLOYMENT_TARGET = 5.2; 683 | }; 684 | name = Debug; 685 | }; 686 | 2282ADDB2144A30600E20C3E /* Release */ = { 687 | isa = XCBuildConfiguration; 688 | buildSettings = { 689 | ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; 690 | CLANG_ANALYZER_NONNULL = YES; 691 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 692 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 693 | CLANG_ENABLE_OBJC_WEAK = YES; 694 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 695 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 696 | CODE_SIGN_STYLE = Automatic; 697 | DEVELOPMENT_TEAM = ""; 698 | GCC_C_LANGUAGE_STANDARD = gnu11; 699 | INFOPLIST_FILE = "watchOS Extension/Info.plist"; 700 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 701 | MTL_FAST_MATH = YES; 702 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-iOS-Example.watchkitapp.watchkitextension"; 703 | PRODUCT_NAME = "${TARGET_NAME}"; 704 | SDKROOT = watchos; 705 | SKIP_INSTALL = YES; 706 | SWIFT_VERSION = 5.0; 707 | TARGETED_DEVICE_FAMILY = 4; 708 | WATCHOS_DEPLOYMENT_TARGET = 5.2; 709 | }; 710 | name = Release; 711 | }; 712 | 2282ADDE2144A30600E20C3E /* Debug */ = { 713 | isa = XCBuildConfiguration; 714 | buildSettings = { 715 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 716 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 717 | CLANG_ANALYZER_NONNULL = YES; 718 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 719 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 720 | CLANG_ENABLE_OBJC_WEAK = YES; 721 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 722 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 723 | CODE_SIGN_STYLE = Automatic; 724 | DEBUG_INFORMATION_FORMAT = dwarf; 725 | GCC_C_LANGUAGE_STANDARD = gnu11; 726 | IBSC_MODULE = "watchOS Example Extension"; 727 | INFOPLIST_FILE = watchOS/Info.plist; 728 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 729 | MTL_FAST_MATH = YES; 730 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-iOS-Example.watchkitapp"; 731 | PRODUCT_NAME = "$(TARGET_NAME)"; 732 | SDKROOT = watchos; 733 | SKIP_INSTALL = YES; 734 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 735 | SWIFT_VERSION = 5; 736 | TARGETED_DEVICE_FAMILY = 4; 737 | WATCHOS_DEPLOYMENT_TARGET = 5.2; 738 | }; 739 | name = Debug; 740 | }; 741 | 2282ADDF2144A30600E20C3E /* Release */ = { 742 | isa = XCBuildConfiguration; 743 | buildSettings = { 744 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 745 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 746 | CLANG_ANALYZER_NONNULL = YES; 747 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 748 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 749 | CLANG_ENABLE_OBJC_WEAK = YES; 750 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 751 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 752 | CODE_SIGN_STYLE = Automatic; 753 | GCC_C_LANGUAGE_STANDARD = gnu11; 754 | IBSC_MODULE = "watchOS Example Extension"; 755 | INFOPLIST_FILE = watchOS/Info.plist; 756 | MTL_FAST_MATH = YES; 757 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-iOS-Example.watchkitapp"; 758 | PRODUCT_NAME = "$(TARGET_NAME)"; 759 | SDKROOT = watchos; 760 | SKIP_INSTALL = YES; 761 | SWIFT_VERSION = 5; 762 | TARGETED_DEVICE_FAMILY = 4; 763 | WATCHOS_DEPLOYMENT_TARGET = 5.2; 764 | }; 765 | name = Release; 766 | }; 767 | 607FACED1AFB9204008FA782 /* Debug */ = { 768 | isa = XCBuildConfiguration; 769 | buildSettings = { 770 | ALWAYS_SEARCH_USER_PATHS = NO; 771 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 772 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 773 | CLANG_CXX_LIBRARY = "libc++"; 774 | CLANG_ENABLE_MODULES = YES; 775 | CLANG_ENABLE_OBJC_ARC = YES; 776 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 777 | CLANG_WARN_BOOL_CONVERSION = YES; 778 | CLANG_WARN_COMMA = YES; 779 | CLANG_WARN_CONSTANT_CONVERSION = YES; 780 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 781 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 782 | CLANG_WARN_EMPTY_BODY = YES; 783 | CLANG_WARN_ENUM_CONVERSION = YES; 784 | CLANG_WARN_INFINITE_RECURSION = YES; 785 | CLANG_WARN_INT_CONVERSION = YES; 786 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 787 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 788 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 789 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 790 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 791 | CLANG_WARN_STRICT_PROTOTYPES = YES; 792 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 793 | CLANG_WARN_UNREACHABLE_CODE = YES; 794 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 795 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 796 | COPY_PHASE_STRIP = NO; 797 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 798 | ENABLE_STRICT_OBJC_MSGSEND = YES; 799 | ENABLE_TESTABILITY = YES; 800 | GCC_C_LANGUAGE_STANDARD = gnu99; 801 | GCC_DYNAMIC_NO_PIC = NO; 802 | GCC_NO_COMMON_BLOCKS = YES; 803 | GCC_OPTIMIZATION_LEVEL = 0; 804 | GCC_PREPROCESSOR_DEFINITIONS = ( 805 | "DEBUG=1", 806 | "$(inherited)", 807 | ); 808 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 809 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 810 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 811 | GCC_WARN_UNDECLARED_SELECTOR = YES; 812 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 813 | GCC_WARN_UNUSED_FUNCTION = YES; 814 | GCC_WARN_UNUSED_VARIABLE = YES; 815 | IPHONEOS_DEPLOYMENT_TARGET = 11; 816 | MTL_ENABLE_DEBUG_INFO = YES; 817 | ONLY_ACTIVE_ARCH = YES; 818 | SDKROOT = iphoneos; 819 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 820 | SWIFT_VERSION = 4.2; 821 | }; 822 | name = Debug; 823 | }; 824 | 607FACEE1AFB9204008FA782 /* Release */ = { 825 | isa = XCBuildConfiguration; 826 | buildSettings = { 827 | ALWAYS_SEARCH_USER_PATHS = NO; 828 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 829 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 830 | CLANG_CXX_LIBRARY = "libc++"; 831 | CLANG_ENABLE_MODULES = YES; 832 | CLANG_ENABLE_OBJC_ARC = YES; 833 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 834 | CLANG_WARN_BOOL_CONVERSION = YES; 835 | CLANG_WARN_COMMA = YES; 836 | CLANG_WARN_CONSTANT_CONVERSION = YES; 837 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 838 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 839 | CLANG_WARN_EMPTY_BODY = YES; 840 | CLANG_WARN_ENUM_CONVERSION = YES; 841 | CLANG_WARN_INFINITE_RECURSION = YES; 842 | CLANG_WARN_INT_CONVERSION = YES; 843 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 844 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 845 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 846 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 847 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 848 | CLANG_WARN_STRICT_PROTOTYPES = YES; 849 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 850 | CLANG_WARN_UNREACHABLE_CODE = YES; 851 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 852 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 853 | COPY_PHASE_STRIP = NO; 854 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 855 | ENABLE_NS_ASSERTIONS = NO; 856 | ENABLE_STRICT_OBJC_MSGSEND = YES; 857 | GCC_C_LANGUAGE_STANDARD = gnu99; 858 | GCC_NO_COMMON_BLOCKS = YES; 859 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 860 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 861 | GCC_WARN_UNDECLARED_SELECTOR = YES; 862 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 863 | GCC_WARN_UNUSED_FUNCTION = YES; 864 | GCC_WARN_UNUSED_VARIABLE = YES; 865 | IPHONEOS_DEPLOYMENT_TARGET = 11; 866 | MTL_ENABLE_DEBUG_INFO = NO; 867 | SDKROOT = iphoneos; 868 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 869 | SWIFT_VERSION = 4.2; 870 | VALIDATE_PRODUCT = YES; 871 | }; 872 | name = Release; 873 | }; 874 | 607FACF01AFB9204008FA782 /* Debug */ = { 875 | isa = XCBuildConfiguration; 876 | buildSettings = { 877 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 878 | INFOPLIST_FILE = iOS/Info.plist; 879 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 880 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 881 | MODULE_NAME = ExampleApp; 882 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-iOS-Example"; 883 | PRODUCT_NAME = "$(TARGET_NAME)"; 884 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 885 | SWIFT_VERSION = 5.0; 886 | }; 887 | name = Debug; 888 | }; 889 | 607FACF11AFB9204008FA782 /* Release */ = { 890 | isa = XCBuildConfiguration; 891 | buildSettings = { 892 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 893 | INFOPLIST_FILE = iOS/Info.plist; 894 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 895 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 896 | MODULE_NAME = ExampleApp; 897 | PRODUCT_BUNDLE_IDENTIFIER = "com.mindgrub.Swash-iOS-Example"; 898 | PRODUCT_NAME = "$(TARGET_NAME)"; 899 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 900 | SWIFT_VERSION = 5.0; 901 | }; 902 | name = Release; 903 | }; 904 | /* End XCBuildConfiguration section */ 905 | 906 | /* Begin XCConfigurationList section */ 907 | 2282AD922144748C00E20C3E /* Build configuration list for PBXNativeTarget "tvOS Example" */ = { 908 | isa = XCConfigurationList; 909 | buildConfigurations = ( 910 | 2282AD8E2144748C00E20C3E /* Debug */, 911 | 2282AD8F2144748C00E20C3E /* Release */, 912 | ); 913 | defaultConfigurationIsVisible = 0; 914 | defaultConfigurationName = Release; 915 | }; 916 | 2282ADD92144A30600E20C3E /* Build configuration list for PBXNativeTarget "watchOS Example Extension" */ = { 917 | isa = XCConfigurationList; 918 | buildConfigurations = ( 919 | 2282ADDA2144A30600E20C3E /* Debug */, 920 | 2282ADDB2144A30600E20C3E /* Release */, 921 | ); 922 | defaultConfigurationIsVisible = 0; 923 | defaultConfigurationName = Release; 924 | }; 925 | 2282ADDD2144A30600E20C3E /* Build configuration list for PBXNativeTarget "watchOS Example" */ = { 926 | isa = XCConfigurationList; 927 | buildConfigurations = ( 928 | 2282ADDE2144A30600E20C3E /* Debug */, 929 | 2282ADDF2144A30600E20C3E /* Release */, 930 | ); 931 | defaultConfigurationIsVisible = 0; 932 | defaultConfigurationName = Release; 933 | }; 934 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Swash Examples" */ = { 935 | isa = XCConfigurationList; 936 | buildConfigurations = ( 937 | 607FACED1AFB9204008FA782 /* Debug */, 938 | 607FACEE1AFB9204008FA782 /* Release */, 939 | ); 940 | defaultConfigurationIsVisible = 0; 941 | defaultConfigurationName = Release; 942 | }; 943 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "iOS Example" */ = { 944 | isa = XCConfigurationList; 945 | buildConfigurations = ( 946 | 607FACF01AFB9204008FA782 /* Debug */, 947 | 607FACF11AFB9204008FA782 /* Release */, 948 | ); 949 | defaultConfigurationIsVisible = 0; 950 | defaultConfigurationName = Release; 951 | }; 952 | /* End XCConfigurationList section */ 953 | }; 954 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 955 | } 956 | -------------------------------------------------------------------------------- /Examples/Swash Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Swash Examples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/Swash Examples.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 53 | 54 | 55 | 56 | 57 | 58 | 68 | 70 | 76 | 77 | 78 | 79 | 83 | 84 | 85 | 86 | 92 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Examples/Swash Examples.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Examples/Swash Examples.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 53 | 54 | 55 | 56 | 57 | 58 | 68 | 72 | 78 | 79 | 80 | 81 | 87 | 88 | 89 | 90 | 91 | 92 | 98 | 102 | 108 | 109 | 110 | 111 | 117 | 118 | 119 | 120 | 122 | 123 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Examples/iOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 01/26/2018. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Swash 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Log boilerplate for only the GillSans font family 19 | Swash.logBoilerplate(forFontsWithFamilyNamesContaining: "gill") 20 | return true 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Examples/iOS/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Examples/iOS/Base.lproj/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 | 26 | 27 | 28 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 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 | -------------------------------------------------------------------------------- /Examples/iOS/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Examples/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Swash Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/iOS/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 01/26/2018. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Swash 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet private weak var label1: UILabel! 15 | @IBOutlet private weak var label2: UILabel! 16 | @IBOutlet private weak var label3: UILabel! 17 | @IBOutlet private weak var label4: UILabel! 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | // These are set in interface builder, so no need to set them here. 22 | // label1.adjustsFontForContentSizeCategory = true 23 | // label2.adjustsFontForContentSizeCategory = true 24 | // label3.adjustsFontForContentSizeCategory = true 25 | // label4.adjustsFontForContentSizeCategory = true 26 | 27 | updateFonts() 28 | 29 | NotificationCenter.default.addObserver(self, selector: #selector(updateFonts), name: UIAccessibility.boldTextStatusDidChangeNotification, object: nil) 30 | } 31 | 32 | override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { 33 | super.traitCollectionDidChange(previousTraitCollection) 34 | if traitCollection.preferredContentSizeCategory != previousTraitCollection?.preferredContentSizeCategory { 35 | label2.font = Avenir.light.of(style: .title1) 36 | label4.font = SystemFont.heavy.of(textStyle: .body) 37 | } 38 | } 39 | 40 | @objc private func updateFonts() { 41 | label1.font = Papyrus.regular.of(textStyle: .headline, maxSize: 24) 42 | label2.font = Avenir.light.of(style: .title1) 43 | label3.font = SystemFont.preferred.of(textStyle: .caption1) 44 | label4.font = SystemFont.heavy.of(textStyle: .body) 45 | 46 | label1.text = "فهو يتحدّث بلغة يونيكود. تسجّل الآن Papyrus -> Damascus" 47 | label2.text = label2.font.fontName 48 | label3.text = label3.font.fontName 49 | label4.text = label4.font.fontName 50 | } 51 | 52 | deinit { 53 | NotificationCenter.default.removeObserver(self, name: UIAccessibility.boldTextStatusDidChangeNotification, object: nil) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Examples/tvOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 9/8/18. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | return true 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - App Store.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "2320x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image Wide.imageset", 19 | "role" : "top-shelf-image-wide" 20 | }, 21 | { 22 | "size" : "1920x720", 23 | "idiom" : "tv", 24 | "filename" : "Top Shelf Image.imageset", 25 | "role" : "top-shelf-image" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "tv-marketing", 13 | "scale" : "1x" 14 | }, 15 | { 16 | "idiom" : "tv-marketing", 17 | "scale" : "2x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "tv-marketing", 13 | "scale" : "1x" 14 | }, 15 | { 16 | "idiom" : "tv-marketing", 17 | "scale" : "2x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/tvOS/Assets.xcassets/Launch Image.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "11.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "landscape", 12 | "idiom" : "tv", 13 | "extent" : "full-screen", 14 | "minimum-system-version" : "9.0", 15 | "scale" : "1x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/tvOS/Base.lproj/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 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Examples/tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Swash Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | arm64 30 | 31 | UIUserInterfaceStyle 32 | Automatic 33 | 34 | 35 | -------------------------------------------------------------------------------- /Examples/tvOS/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 9/8/18. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet private weak var label: UILabel! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | label.font = Avenir.roman.of(textStyle: .title1) 18 | label.text = label.font.fontName 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">161" 12 | }, 13 | { 14 | "idiom" : "watch", 15 | "scale" : "2x", 16 | "screen-width" : ">145" 17 | }, 18 | { 19 | "idiom" : "watch", 20 | "scale" : "2x", 21 | "screen-width" : ">183" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "idiom" : "watch", 5 | "filename" : "Circular.imageset", 6 | "role" : "circular" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "filename" : "Extra Large.imageset", 11 | "role" : "extra-large" 12 | }, 13 | { 14 | "idiom" : "watch", 15 | "filename" : "Graphic Bezel.imageset", 16 | "role" : "graphic-bezel" 17 | }, 18 | { 19 | "idiom" : "watch", 20 | "filename" : "Graphic Circular.imageset", 21 | "role" : "graphic-circular" 22 | }, 23 | { 24 | "idiom" : "watch", 25 | "filename" : "Graphic Corner.imageset", 26 | "role" : "graphic-corner" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "filename" : "Graphic Large Rectangular.imageset", 31 | "role" : "graphic-large-rectangular" 32 | }, 33 | { 34 | "idiom" : "watch", 35 | "filename" : "Modular.imageset", 36 | "role" : "modular" 37 | }, 38 | { 39 | "idiom" : "watch", 40 | "filename" : "Utilitarian.imageset", 41 | "role" : "utilitarian" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">161" 12 | }, 13 | { 14 | "idiom" : "watch", 15 | "scale" : "2x", 16 | "screen-width" : ">145" 17 | }, 18 | { 19 | "idiom" : "watch", 20 | "scale" : "2x", 21 | "screen-width" : ">183" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">161" 12 | }, 13 | { 14 | "idiom" : "watch", 15 | "scale" : "2x", 16 | "screen-width" : ">145" 17 | }, 18 | { 19 | "idiom" : "watch", 20 | "scale" : "2x", 21 | "screen-width" : ">183" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "watch", 5 | "scale" : "2x", 6 | "screen-width" : "<=145" 7 | }, 8 | { 9 | "idiom" : "watch", 10 | "scale" : "2x", 11 | "screen-width" : ">161" 12 | }, 13 | { 14 | "idiom" : "watch", 15 | "scale" : "2x", 16 | "screen-width" : ">145" 17 | }, 18 | { 19 | "idiom" : "watch", 20 | "scale" : "2x", 21 | "screen-width" : ">183" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/watchOS Extension/ExtensionDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExtensionDelegate.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 9/8/18. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | 11 | class ExtensionDelegate: NSObject, WKExtensionDelegate { 12 | 13 | func handle(_ backgroundTasks: Set) { 14 | // Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one. 15 | for task in backgroundTasks { 16 | // Use a switch statement to check the task type 17 | switch task { 18 | case let backgroundTask as WKApplicationRefreshBackgroundTask: 19 | // Be sure to complete the background task once you’re done. 20 | backgroundTask.setTaskCompletedWithSnapshot(false) 21 | case let snapshotTask as WKSnapshotRefreshBackgroundTask: 22 | // Snapshot tasks have a unique completion call, make sure to set your expiration date 23 | snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil) 24 | case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask: 25 | // Be sure to complete the connectivity task once you’re done. 26 | connectivityTask.setTaskCompletedWithSnapshot(false) 27 | case let urlSessionTask as WKURLSessionRefreshBackgroundTask: 28 | // Be sure to complete the URL session task once you’re done. 29 | urlSessionTask.setTaskCompletedWithSnapshot(false) 30 | case let relevantShortcutTask as WKRelevantShortcutRefreshBackgroundTask: 31 | // Be sure to complete the relevant-shortcut task once you're done. 32 | relevantShortcutTask.setTaskCompletedWithSnapshot(false) 33 | case let intentDidRunTask as WKIntentDidRunRefreshBackgroundTask: 34 | // Be sure to complete the intent-did-run task once you're done. 35 | intentDidRunTask.setTaskCompletedWithSnapshot(false) 36 | default: 37 | // make sure to complete unhandled task types 38 | task.setTaskCompletedWithSnapshot(false) 39 | } 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Examples/watchOS Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Swash Example Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionAttributes 26 | 27 | WKAppBundleIdentifier 28 | com.mindgrub.Swash-iOS-Example.watchkitapp 29 | 30 | NSExtensionPointIdentifier 31 | com.apple.watchkit 32 | 33 | WKExtensionDelegateClassName 34 | $(PRODUCT_MODULE_NAME).ExtensionDelegate 35 | 36 | 37 | -------------------------------------------------------------------------------- /Examples/watchOS Extension/InterfaceController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 9/8/18. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import WatchKit 10 | import Foundation 11 | 12 | class InterfaceController: WKInterfaceController { 13 | 14 | @IBOutlet private weak var label: WKInterfaceLabel! 15 | 16 | override func awake(withContext context: Any?) { 17 | super.awake(withContext: context) 18 | let font = Avenir.oblique.of(textStyle: .body) 19 | let text = NSAttributedString(string: font.fontName, 20 | attributes: [.font: font]) 21 | label.setAttributedText(text) 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Examples/watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "24x24", 5 | "idiom" : "watch", 6 | "scale" : "2x", 7 | "role" : "notificationCenter", 8 | "subtype" : "38mm" 9 | }, 10 | { 11 | "size" : "27.5x27.5", 12 | "idiom" : "watch", 13 | "scale" : "2x", 14 | "role" : "notificationCenter", 15 | "subtype" : "42mm" 16 | }, 17 | { 18 | "size" : "29x29", 19 | "idiom" : "watch", 20 | "role" : "companionSettings", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "29x29", 25 | "idiom" : "watch", 26 | "role" : "companionSettings", 27 | "scale" : "3x" 28 | }, 29 | { 30 | "size" : "40x40", 31 | "idiom" : "watch", 32 | "scale" : "2x", 33 | "role" : "appLauncher", 34 | "subtype" : "38mm" 35 | }, 36 | { 37 | "size" : "44x44", 38 | "idiom" : "watch", 39 | "scale" : "2x", 40 | "role" : "appLauncher", 41 | "subtype" : "40mm" 42 | }, 43 | { 44 | "size" : "50x50", 45 | "idiom" : "watch", 46 | "scale" : "2x", 47 | "role" : "appLauncher", 48 | "subtype" : "44mm" 49 | }, 50 | { 51 | "size" : "86x86", 52 | "idiom" : "watch", 53 | "scale" : "2x", 54 | "role" : "quickLook", 55 | "subtype" : "38mm" 56 | }, 57 | { 58 | "size" : "98x98", 59 | "idiom" : "watch", 60 | "scale" : "2x", 61 | "role" : "quickLook", 62 | "subtype" : "42mm" 63 | }, 64 | { 65 | "size" : "108x108", 66 | "idiom" : "watch", 67 | "scale" : "2x", 68 | "role" : "quickLook", 69 | "subtype" : "44mm" 70 | }, 71 | { 72 | "idiom" : "watch-marketing", 73 | "size" : "1024x1024", 74 | "scale" : "1x" 75 | } 76 | ], 77 | "info" : { 78 | "version" : 1, 79 | "author" : "xcode" 80 | } 81 | } -------------------------------------------------------------------------------- /Examples/watchOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/watchOS/Base.lproj/Interface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Examples/watchOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Swash Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | UISupportedInterfaceOrientations 24 | 25 | UIInterfaceOrientationPortrait 26 | UIInterfaceOrientationPortraitUpsideDown 27 | 28 | WKCompanionAppBundleIdentifier 29 | com.mindgrub.Swash-iOS-Example 30 | WKWatchKitApp 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Mindgrub 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Swash 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/Swash.svg?style=flat)](#installation) 4 | ![Swift 5.1](https://img.shields.io/badge/Swift-5.1-orange.svg) 5 | ![Platforms](https://img.shields.io/cocoapods/p/Swash.svg?style=flat) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | [![License](https://img.shields.io/cocoapods/l/Swash.svg?style=flat)](http://doge.mit-license.org) 8 | 9 | Swash is a simple, safe, and expressive abstraction of `UIFont` with baked-in support for dynamic type. 10 | 11 | ## Usage 12 | To define a custom font, just create a `String` enum that conforms to the `Font` protocol. 13 | ```swift 14 | enum Papyrus: String, Font { 15 | case regular = "Papyrus" 16 | case condensed = "Papyrus-Condensed" 17 | } 18 | ``` 19 | 20 | That's all you need to start using your font in your project! 21 | 22 | ### Static Sizes 23 | ```swift 24 | label.font = Papyrus.regular.of(size: 17) 25 | ``` 26 | 27 | ### Dynamic Type (iOS 11+) 28 | Uses [`UIFontMetrics`](https://developer.apple.com/documentation/uikit/uifontmetrics) for scaling. Setting [`adjustsFontForContentSizeCategory`](https://developer.apple.com/documentation/uikit/uicontentsizecategoryadjusting/1771731-adjustsfontforcontentsizecategor) to `true` tells the label to automatically update the font when the user changes their content size preference. See our [blog post](https://blog.mindgrub.com/custom-fonts-in-ios-made-simple-yet-powerful) for guidance on choosing default sizes for text styles, or just use Swash's provided defaults pulled from Apple's Human Interface Guidelines for [iOS](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/), [watchOS](https://developer.apple.com/design/human-interface-guidelines/watchos/visual-design/typography/), and [tvOS](https://developer.apple.com/design/human-interface-guidelines/tvos/visual-design/typography/). 29 | ```swift 30 | label1.adjustsFontForContentSizeCategory = true 31 | label2.adjustsFontForContentSizeCategory = true 32 | 33 | label1.font = Papyrus.condensed.of(textStyle: .headline) 34 | // Optional size cutoff and default size. 35 | label2.font = GillSans.bold.of(textStyle: .title1, defaultSize: 28, maxSize: 38) 36 | ``` 37 | ![Dynamic Type Demo](https://raw.githubusercontent.com/Mindgrub/Swash/master/Assets/dynamic_type_demo.gif) 38 | 39 | ### Dynamic Type (Before iOS 11) 40 | Uses system font scaling, no default size value. [`adjustsFontForContentSizeCategory`](https://developer.apple.com/documentation/uikit/uicontentsizecategoryadjusting/1771731-adjustsfontforcontentsizecategor) requires the use of [`UIFontMetrics`](https://developer.apple.com/documentation/uikit/uifontmetrics), so it is of no use for custom fonts before iOS 11. You'll have to update the fonts manually, either in [`traitCollectionDidChange(_:)`](https://developer.apple.com/documentation/uikit/uitraitenvironment/1623516-traitcollectiondidchange) or by observing the [`UIContentSizeCategoryDidChange`](https://developer.apple.com/documentation/foundation/nsnotification.name/1622948-uicontentsizecategorydidchange) notification. 41 | ```swift 42 | label.font = Papyrus.condensed.of(style: .headline) 43 | // Optional size cutoff 44 | label.font = GillSans.bold.of(style: .title1, maxSize: 30) 45 | ``` 46 | 47 | ### System Font 48 | You can use `SystemFont` to support dynamic type for different weights and further unify the font syntax in your project. 49 | ```swift 50 | label1.font = SystemFont.light.of(size: 17) 51 | label2.adjustsFontForContentSizeCategory = true 52 | label2.font = SystemFont.preferred.of(textStyle: .body) 53 | label3.font = SystemFont.semiboldItalic.of(textStyle: .body, maxSize: 30) 54 | ``` 55 | **Important note:** [`adjustsFontForContentSizeCategory`](https://developer.apple.com/documentation/uikit/uicontentsizecategoryadjusting/1771731-adjustsfontforcontentsizecategor) only works with `SystemFont` for the `preferred` weight with a nil `maxSize` value. In any other case, you will need to update the font either in [`traitCollectionDidChange(_:)`](https://developer.apple.com/documentation/uikit/uitraitenvironment/1623516-traitcollectiondidchange) or by observing the [`UIContentSizeCategoryDidChange`](https://developer.apple.com/documentation/foundation/nsnotification.name/1622948-uicontentsizecategorydidchange) notification. This is because the `preferred` weight directly returns the result of [`UIFont.preferredFont(forTextStyle:)`](https://developer.apple.com/documentation/uikit/uifont/1619030-preferredfont). 56 | 57 | ### Bold Text Device Setting 58 | You can implement the `boldTextMapping` property on any `Font` in order to support the "Bold Text" device setting on iOS and tvOS. 59 | ``` 60 | var boldTextMapping: MyFont { 61 | switch self { 62 | case .regular: return .bold 63 | case .bold: return .black 64 | case .black: return self 65 | } 66 | } 67 | ``` 68 | Now every regular `MyFont` instance will become bold if the user has "Bold Text" turned on in their device settings. 69 | 70 | If you'd like, you can observe `UIAccessibility.boldTextStatusDidChangeNotification` via `NotificationCenter` and set your fonts when that updates. 71 | 72 | ### Font Cascading 73 | You can implement the static `cascadeList` property on any `Font` in order to support font cascading. In the event that your font does not support a character that is used in a label, this list will provide fallback fonts to use. 74 | ``` 75 | enum Papyrus: String, Font { 76 | case condensed = "Papyrus-Condensed" 77 | case regular = "Papyrus" 78 | 79 | var cascadeList: [CascadingFontProperties] { 80 | [.init(Damascus.regular)] 81 | } 82 | } 83 | ``` 84 | Papyrus does not support Arabic characters. So, here we've provided Damascus as a fallback. If no fallback is provided, the system font will be used for unsupported characters. 85 | 86 | ### Generate Boilerplate 87 | Swash can attempt to log your font boilerplate for you! 88 | ```swift 89 | Swash.logBoilerplate(forFontsWithFamilyNamesContaining: "gill") 90 | ``` 91 | Output: 92 | ``` 93 | enum GillSans: String, Font { 94 | case GillSans-Italic = "GillSans-Italic" 95 | case GillSans-SemiBold = "GillSans-SemiBold" 96 | case GillSans-UltraBold = "GillSans-UltraBold" 97 | case GillSans-Light = "GillSans-Light" 98 | case GillSans-Bold = "GillSans-Bold" 99 | case GillSans = "GillSans" 100 | case GillSans-SemiBoldItalic = "GillSans-SemiBoldItalic" 101 | case GillSans-BoldItalic = "GillSans-BoldItalic" 102 | case GillSans-LightItalic = "GillSans-LightItalic" 103 | } 104 | ``` 105 | Just copy-paste the output into your project. You'll probably still need to doctor the case names a bit. 106 | 107 | ### Debug Crashing 108 | If your custom font fails to initialize, [`assertionFailure(_:file:line:)`](https://developer.apple.com/documentation/swift/1539616-assertionfailure) is called. This will crash debug builds with the default `-Onone` compiler optimization set. This is to help identify failed font initializations which can otherwise be hard to catch. **Release builds with higher optimization levels will NOT crash**, so you don't have to worry about your app crashing in production over a silly font. 109 | 110 | ## Installation 111 | 112 | ### CocoaPods 113 | 114 | ```ruby 115 | pod 'Swash' 116 | ``` 117 | 118 | ### Carthage 119 | 120 | ``` 121 | github "Mindgrub/Swash" 122 | ``` 123 | Make sure to specify your platform when you update (e.g. `carthage update --platform iOS`). Otherwise all 3 frameworks (iOS, tvOS, and watchOS) will be added. 124 | 125 | ## License 126 | 127 | Swash is available under the MIT license. See the LICENSE file for more info. 128 | -------------------------------------------------------------------------------- /Source/CascadingFontProperties.swift: -------------------------------------------------------------------------------- 1 | 2 | public struct CascadingFontProperties { 3 | public let fontName: String 4 | public let boldFontName: String? 5 | 6 | public init(_ font: F) { 7 | self.fontName = font.rawValue 8 | self.boldFontName = font.boldTextMapping.rawValue 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Source/Default Sizes/DefaultSizes+iOS.swift: -------------------------------------------------------------------------------- 1 | #if os(iOS) 2 | import UIKit 3 | 4 | /** 5 | Default text sizes taken from Apple's Human Interface Guidelines ([iOS](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/), [watchOS](https://developer.apple.com/design/human-interface-guidelines/watchos/visual-design/typography/), [tvOS](https://developer.apple.com/design/human-interface-guidelines/tvos/visual-design/typography/)). These sizes correspond to the default category used by `UIFontMetrics` for dynamic type. It varies per OS and device. 6 | */ 7 | @available(iOS 11.0, *) 8 | internal let defaultSizes: [UIFont.TextStyle: CGFloat] = 9 | [.caption2: 11, 10 | .caption1: 12, 11 | .footnote: 13, 12 | .subheadline: 15, 13 | .callout: 16, 14 | .body: 17, 15 | .headline: 17, 16 | .title3: 20, 17 | .title2: 22, 18 | .title1: 28, 19 | .largeTitle: 34] 20 | #endif 21 | -------------------------------------------------------------------------------- /Source/Default Sizes/DefaultSizes+tvOS.swift: -------------------------------------------------------------------------------- 1 | #if os(tvOS) 2 | import UIKit 3 | 4 | /** 5 | Default text sizes taken from Apple's Human Interface Guidelines ([iOS](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/), [watchOS](https://developer.apple.com/design/human-interface-guidelines/watchos/visual-design/typography/), [tvOS](https://developer.apple.com/design/human-interface-guidelines/tvos/visual-design/typography/)). These sizes correspond to the default category used by `UIFontMetrics` for dynamic type. It varies per OS and device. 6 | */ 7 | @available(tvOS 11.0, *) 8 | internal let defaultSizes: [UIFont.TextStyle: CGFloat] = 9 | [.caption2: 23, 10 | .caption1: 25, 11 | .footnote: 29, 12 | .subheadline: 29, 13 | .body: 29, 14 | .callout: 31, 15 | .headline: 38, 16 | .title3: 48, 17 | .title2: 57, 18 | .title1: 76] 19 | #endif 20 | -------------------------------------------------------------------------------- /Source/Default Sizes/DefaultSizes+watchOS.swift: -------------------------------------------------------------------------------- 1 | #if os(watchOS) 2 | import WatchKit 3 | 4 | /** 5 | Default text sizes taken from Apple's Human Interface Guidelines ([iOS](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/), [watchOS](https://developer.apple.com/design/human-interface-guidelines/watchos/visual-design/typography/), [tvOS](https://developer.apple.com/design/human-interface-guidelines/tvos/visual-design/typography/)). These sizes correspond to the default category used by `UIFontMetrics` for dynamic type. It varies per OS and device. 6 | */ 7 | internal let defaultSizes: [UIFont.TextStyle: CGFloat] = { 8 | if #available(watchOS 5.0, *) { 9 | switch (WKInterfaceDevice.current().preferredContentSizeCategory) { 10 | case "UICTContentSizeCategoryS": 11 | return [.footnote: 12, 12 | .caption2: 13, 13 | .caption1: 14, 14 | .body: 15, 15 | .headline: 15, 16 | .title3: 18, 17 | .title2: 26, 18 | .title1: 30, 19 | .largeTitle: 32] 20 | case "UICTContentSizeCategoryL": 21 | return [.footnote: 13, 22 | .caption2: 14, 23 | .caption1: 15, 24 | .body: 16, 25 | .headline: 16, 26 | .title3: 19, 27 | .title2: 27, 28 | .title1: 34, 29 | .largeTitle: 36] 30 | case "UICTContentSizeCategoryXL": 31 | return [.footnote: 14, 32 | .caption2: 15, 33 | .caption1: 16, 34 | .body: 17, 35 | .headline: 17, 36 | .title3: 20, 37 | .title2: 30, 38 | .title1: 38, 39 | .largeTitle: 40] 40 | default: 41 | return [:] 42 | } 43 | } else { 44 | /// No `largeTitle` before watchOS 5 45 | switch (WKInterfaceDevice.current().preferredContentSizeCategory) { 46 | case "UICTContentSizeCategoryS": 47 | return [.footnote: 12, 48 | .caption2: 13, 49 | .caption1: 14, 50 | .body: 15, 51 | .headline: 15, 52 | .title3: 18, 53 | .title2: 26, 54 | .title1: 30] 55 | case "UICTContentSizeCategoryL": 56 | return [.footnote: 13, 57 | .caption2: 14, 58 | .caption1: 15, 59 | .body: 16, 60 | .headline: 16, 61 | .title3: 19, 62 | .title2: 27, 63 | .title1: 34] 64 | default: 65 | return [:] 66 | } 67 | } 68 | }() 69 | #endif 70 | -------------------------------------------------------------------------------- /Source/Font.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | /** 4 | A type that represents a font and can generate a `UIFont` object. 5 | */ 6 | public protocol Font: RawRepresentable, Hashable where Self.RawValue == String { 7 | 8 | /** 9 | Defines a mapping to convert one Font weight to another in the case that `UIAccessibility.isBoldTextEnabled` is true. Does not apply to watchOS. 10 | 11 | Example: 12 | ``` 13 | var boldTextMapping: MyFont { 14 | switch self { 15 | case .regular: return .bold 16 | case .bold: return .black 17 | case .black: return self 18 | } 19 | } 20 | ``` 21 | Now every regular `MyFont` instance will become bold if the user has "Bold Text" turned on in their device settings. 22 | 23 | If you'd like, you can observe `UIAccessibility.boldTextStatusDidChangeNotification` via `NotificationCenter` and set your fonts when that updates. 24 | */ 25 | var boldTextMapping: Self { get } 26 | 27 | /** 28 | Defines a list of fonts to fall back to in the case that characters are used which the font does not support. Uses `UIFontDescriptor.AttributeName.cascadeList`. 29 | 30 | Example: 31 | ``` 32 | var cascadeList: [CascadingFontProperties] { 33 | switch self { 34 | case .regular: 35 | return [.init(Damascus.regular)] 36 | case .bold: 37 | return [.init(Damascus.bold)] 38 | } 39 | ``` 40 | */ 41 | var cascadeList: [CascadingFontProperties] { get } 42 | 43 | func of(size: CGFloat) -> UIFont 44 | 45 | @available(iOS 11.0, watchOS 4.0, tvOS 11.0, *) 46 | func of(textStyle: UIFont.TextStyle, maxSize: CGFloat?, defaultSize: CGFloat?) -> UIFont 47 | 48 | @available(iOS, introduced: 8.2, deprecated: 11.0, message: "Use `of(textStyle:maxSize:defaultSize:)` instead") 49 | @available(watchOS, introduced: 2.0, deprecated: 4.0, message: "Use `of(textStyle:maxSize:defaultSize:)` instead") 50 | @available(tvOS, introduced: 9.0, deprecated: 11.0, message: "Use `of(textStyle:maxSize:defaultSize:)` instead") 51 | func of(style: UIFont.TextStyle, maxSize: CGFloat?) -> UIFont 52 | } 53 | 54 | public extension Font { 55 | 56 | var boldTextMapping: Self { self } 57 | var cascadeList: [CascadingFontProperties] { [] } 58 | 59 | /** 60 | Creates a font object of the specified size. 61 | 62 | The `rawValue` string is used to initialize the `UIFont` object with `UIFont(name:size:)`. 63 | 64 | If the font fails to initialize in a debug build (using `-Onone` optimization), a fatal error will be thrown. This is done to help catch boilerplate typos in development. 65 | 66 | Instead of using this method to get a font, it’s often more appropriate to use `of(textStyle:maxSize:defaultSize:)` because that method respects the user’s selected content size category. 67 | 68 | - Parameter size: The text size for the font. 69 | 70 | - Returns: A font object of the specified size. 71 | */ 72 | func of(size: CGFloat) -> UIFont { 73 | let fontName: String 74 | let cascadeNames: [String] 75 | 76 | #if os(iOS) || os(tvOS) 77 | fontName = UIAccessibility.isBoldTextEnabled 78 | ? boldTextMapping.rawValue 79 | : rawValue 80 | 81 | cascadeNames = UIAccessibility.isBoldTextEnabled 82 | ? cascadeList.map { $0.boldFontName ?? $0.fontName } 83 | : cascadeList.map { $0.fontName } 84 | #else 85 | fontName = rawValue 86 | cascadeNames = cascadeList.map { $0.fontName } 87 | #endif 88 | 89 | guard let font = UIFont(name: fontName, size: size) else { 90 | // If font not found, crash debug builds. 91 | assertionFailure("Font not found: \(rawValue)") 92 | return .systemFont(ofSize: size) 93 | } 94 | 95 | let cascadeDescriptors = cascadeNames.map { UIFontDescriptor(fontAttributes: [.name: $0]) } 96 | let cascadedFontDescriptor = font.fontDescriptor.addingAttributes([.cascadeList: cascadeDescriptors]) 97 | return UIFont(descriptor: cascadedFontDescriptor, size: size) 98 | } 99 | 100 | /** 101 | Creates a dynamic font object corresponding to the given parameters. 102 | 103 | Uses `UIFontMetrics` to initialize the dynamic font. If the font fails to initialize in a debug build (using `-Onone` optimization), a fatal error will be thrown. This is done to help catch boilerplate typos in development. 104 | 105 | If no default size is provided, the default specified in Apple's Human Interface Guidelines ([iOS](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/), [watchOS](https://developer.apple.com/design/human-interface-guidelines/watchos/visual-design/typography/), [tvOS](https://developer.apple.com/design/human-interface-guidelines/tvos/visual-design/typography/)) is used. 106 | 107 | - Parameters: 108 | - textStyle: The text style used to scale the text. 109 | - defaultSize: The base size used for text scaling. Corresponds to `UIContentSizeCategory.large`. 110 | - maxSize: The size which the text may not exceed. 111 | 112 | - Returns: A dynamic font object corresponding to the given parameters. 113 | */ 114 | @available(iOS 11.0, watchOS 4.0, tvOS 11.0, *) 115 | func of(textStyle: UIFont.TextStyle, maxSize: CGFloat? = nil, defaultSize: CGFloat? = nil) -> UIFont { 116 | // If no default size provided, use the default specified in Apple's HIG 117 | guard let defaultSize = defaultSize ?? defaultSizes[textStyle] else { 118 | assertionFailure(""" 119 | Text style \(textStyle.rawValue) is not accounted for in Swash's 120 | default size dictionary 🤭. Either Apple's HIG has not specified a 121 | default size for \(textStyle.rawValue) for the device you are using, 122 | or it was recently added and this library needs to be updated (GitHub 123 | issues and pull requests are much appreciated!). In any case, at 124 | least for now, you must provide a default size to use this text style. 125 | """) 126 | return of(size: 17) 127 | } 128 | 129 | let font = of(size: defaultSize) 130 | let fontMetrics = UIFontMetrics(forTextStyle: textStyle) 131 | 132 | if let maxSize = maxSize { 133 | return fontMetrics.scaledFont(for: font, maximumPointSize: maxSize) 134 | } else { 135 | return fontMetrics.scaledFont(for: font) 136 | } 137 | } 138 | 139 | /** 140 | Creates a font object sized based on the given parameters. 141 | 142 | `UIFontMetrics` didn't exist before iOS 11, so the built-in system font scaling is used to determine the size. If the font fails to initialize in a debug build (using `-Onone` optimization), a fatal error will be thrown. This is done to help catch boilerplate typos in development. 143 | 144 | - Parameters: 145 | - style: The text style used to scale the text. 146 | - maxSize: Size which the text may not exceed. 147 | 148 | - Returns: A font object corresponding to the given parameters. 149 | */ 150 | @available(iOS, introduced: 8.2, deprecated: 11.0, message: "Use `of(textStyle:maxSize:defaultSize:)` instead") 151 | @available(watchOS, introduced: 2.0, deprecated: 4.0, message: "Use `of(textStyle:maxSize:defaultSize:)` instead") 152 | @available(tvOS, introduced: 9.0, deprecated: 11.0, message: "Use `of(textStyle:maxSize:defaultSize:)` instead") 153 | func of(style: UIFont.TextStyle, maxSize: CGFloat? = nil) -> UIFont { 154 | let pointSize = UIFont.preferredFont(forTextStyle: style).pointSize 155 | 156 | if let maxSize = maxSize, pointSize > maxSize { 157 | return of(size: maxSize) 158 | } else { 159 | return of(size: pointSize) 160 | } 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /Source/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/Supporting Files/Swash.h: -------------------------------------------------------------------------------- 1 | // 2 | // Swash.h 3 | // Swash 4 | // 5 | // Created by Sam Francis on 3/30/19. 6 | // Copyright © 2019 Mindgrub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Swash. 12 | FOUNDATION_EXPORT double SwashVersionNumber; 13 | 14 | //! Project version string for Swash. 15 | FOUNDATION_EXPORT const unsigned char SwashVersionString[]; 16 | -------------------------------------------------------------------------------- /Source/SystemFont.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | /** 4 | A type that represents the system font and can generate a `UIFont` object. 5 | */ 6 | public enum SystemFont { 7 | /** 8 | Represents the "preferred" system font. 9 | 10 | For this case, `of(size:)` returns the direct result of `UIFont.systemFont(ofSize:)`. In addition, `of(textStyle:maxSize:)` returns the direct result of `UIFont.preferredFont(forTextStyle:)` when `maxSize` is `nil`. This is the only case which allows for labels and text views to automatically resize if `adjustsFontForContentSizeCategory` is `true`. 11 | */ 12 | case preferred 13 | 14 | case ultraLight 15 | case thin 16 | case light 17 | case regular 18 | case medium 19 | case semibold 20 | case bold 21 | case heavy 22 | case black 23 | 24 | #if os(iOS) || os(tvOS) 25 | /** 26 | Represents the system font generated with symbolic traits `[.traitCondensed]`. 27 | 28 | Findings: On watchOS, this translates to `.SFCompactText-Heavy` up to 19pt and `.SFCompactText-Black` for larger sizes. So I've excluded this option from watchOS. 29 | */ 30 | case condensed 31 | #endif 32 | 33 | /** 34 | Represents the system font generated with symbolic traits `[.traitItalic, .traitBold]`. 35 | 36 | Findings: On iOS, this translates to `.SFUIText-SemiboldItalic`. On tvOS, it translates to `.SFUIText-BoldItalic`. On watchOS, `.SFCompactText-BoldItalic`. 37 | */ 38 | case boldItalic 39 | 40 | /** 41 | Represents the system font generated with symbolic traits `[.traitItalic]`. 42 | */ 43 | case italic 44 | 45 | 46 | private enum Style { 47 | case weight(UIFont.Weight) 48 | case traits(UIFontDescriptor.SymbolicTraits) 49 | } 50 | 51 | private var style: Style? { 52 | switch self { 53 | case .preferred: return nil 54 | 55 | case .ultraLight: return .weight(.ultraLight) 56 | case .thin: return .weight(.thin) 57 | case .light: return .weight(.light) 58 | case .regular: return .weight(.regular) 59 | case .medium: return .weight(.medium) 60 | case .semibold: return .weight(.semibold) 61 | case .bold: return .weight(.bold) 62 | case .heavy: return .weight(.heavy) 63 | case .black: return .weight(.black) 64 | 65 | #if os(iOS) || os(tvOS) 66 | case .condensed: return .traits([.traitCondensed]) 67 | #endif 68 | case .boldItalic: return .traits([.traitItalic, .traitBold]) 69 | case .italic: return .traits([.traitItalic]) 70 | } 71 | } 72 | 73 | /** 74 | Creates a system font object of the specified size. 75 | 76 | Instead of using this method to get a font, it’s often more appropriate to use `of(textStyle:maxSize:)` because that method respects the user’s selected content size category. 77 | 78 | - Parameter size: The text size for the font. 79 | 80 | - Returns: A system font object of the specified size. 81 | */ 82 | public func of(size: CGFloat) -> UIFont { 83 | guard let style = style else { 84 | return .systemFont(ofSize: size) 85 | } 86 | 87 | switch style { 88 | case .weight(let weight): 89 | return .systemFont(ofSize: size, weight: weight) 90 | case .traits(let traits): 91 | if let descriptor = UIFont.systemFont(ofSize: size, weight: .regular).fontDescriptor.withSymbolicTraits(traits) { 92 | return UIFont(descriptor: descriptor, size: size) 93 | } else { 94 | // Should never be reached 95 | return .systemFont(ofSize: size) 96 | } 97 | } 98 | } 99 | 100 | /** 101 | Creates a dynamic font object sized based on the given parameters. 102 | 103 | When used to set the text value of a label or text view, set `adjustsFontForContentSizeCategory` to `true`. 104 | 105 | - Important: The `adjustsFontForContentSizeCategory` property on `UILabel`, `UITextView`, etc. only works for the `preferred` weight with a nil `maxSize` value. In any other case, you will need to update the font either in `traitCollectionDidChange()` or by observing the `UIContentSizeCategoryDidChange` notification. 106 | 107 | - Parameters: 108 | - textStyle: The text style used to scale the text. 109 | - maxSize: Size which the text may not exceed. 110 | 111 | - Returns: A system font object corresponding to the given parameters. 112 | */ 113 | public func of(textStyle: UIFont.TextStyle, maxSize: CGFloat? = nil) -> UIFont { 114 | if self == .preferred && maxSize == nil { 115 | return .preferredFont(forTextStyle: textStyle) 116 | } 117 | 118 | let pointSize = UIFont.preferredFont(forTextStyle: textStyle).pointSize 119 | 120 | if let maxSize = maxSize, pointSize > maxSize { 121 | return of(size: maxSize) 122 | } else { 123 | return of(size: pointSize) 124 | } 125 | } 126 | 127 | } 128 | -------------------------------------------------------------------------------- /Source/Utils.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | /// A namespace for Swash utility methods. 4 | public enum Swash { 5 | /** 6 | Logs an attempt at generating custom font boilerplate. 7 | 8 | - Parameter filter: Used to narrow the log to your desired fonts. Case is ignored. Defaults to empty string. 9 | */ 10 | public static func logBoilerplate(forFontsWithFamilyNamesContaining filter: String = "") { 11 | let trimmedFilter = filter.trimmingCharacters(in: .whitespaces).lowercased() 12 | UIFont.familyNames 13 | .filter { $0.lowercased().contains(trimmedFilter) || trimmedFilter == "" } 14 | .forEach { familyName in 15 | var str = "\nenum \(familyName.replacingOccurrences(of: " ", with: "")): String, Font {\n" 16 | str += UIFont.fontNames(forFamilyName: familyName) 17 | .map { "\tcase \($0) = \"\($0)\"" } 18 | .joined(separator: "\n") 19 | 20 | str += "\n}" 21 | print(str) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Swash.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint Swash.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | 6 | Pod::Spec.new do |s| 7 | s.name = 'Swash' 8 | s.version = '4.0.0' 9 | s.summary = 'A simple, safe, and expressive abstraction of UIFont with baked-in support for dynamic type.' 10 | s.homepage = 'https://github.com/Mindgrub/Swash' 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = 'Mindgrub' 13 | s.source = { :git => 'https://github.com/Mindgrub/Swash.git', :tag => s.version.to_s } 14 | s.social_media_url = 'https://twitter.com/mindgrub' 15 | 16 | s.ios.deployment_target = '8.2' 17 | s.tvos.deployment_target = "9.0" 18 | s.watchos.deployment_target = "2.0" 19 | s.swift_version = '5.1' 20 | 21 | s.source_files = 'Source/**/*.swift' 22 | end 23 | -------------------------------------------------------------------------------- /Swash.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 224BAC0D224F41F200316608 /* Swash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC03224F41F100316608 /* Swash.framework */; }; 11 | 224BAC14224F41F200316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 224BAC24224F442200316608 /* DefaultSizes+tvOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC21224F442200316608 /* DefaultSizes+tvOS.swift */; }; 13 | 224BAC26224F442200316608 /* DefaultSizes+watchOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC22224F442200316608 /* DefaultSizes+watchOS.swift */; }; 14 | 224BAC28224F442200316608 /* DefaultSizes+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC23224F442200316608 /* DefaultSizes+iOS.swift */; }; 15 | 224BAC2D224F443700316608 /* SystemFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2A224F443700316608 /* SystemFont.swift */; }; 16 | 224BAC2F224F443700316608 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2B224F443700316608 /* Utils.swift */; }; 17 | 224BAC31224F443700316608 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2C224F443700316608 /* Font.swift */; }; 18 | 224BAC38224F44AE00316608 /* SystemFontTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC35224F44AE00316608 /* SystemFontTests.swift */; }; 19 | 224BAC39224F44AE00316608 /* CustomFontTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC36224F44AE00316608 /* CustomFontTests.swift */; }; 20 | 224BAC3C224F459500316608 /* TestFonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC3B224F459500316608 /* TestFonts.swift */; }; 21 | 224BAC4B224FF35400316608 /* Swash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224BAC42224FF35300316608 /* Swash.framework */; }; 22 | 224BAC59224FF37C00316608 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2C224F443700316608 /* Font.swift */; }; 23 | 224BAC5A224FF37C00316608 /* SystemFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2A224F443700316608 /* SystemFont.swift */; }; 24 | 224BAC5B224FF37C00316608 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2B224F443700316608 /* Utils.swift */; }; 25 | 224BAC5C224FF37C00316608 /* DefaultSizes+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC23224F442200316608 /* DefaultSizes+iOS.swift */; }; 26 | 224BAC5D224FF37C00316608 /* DefaultSizes+tvOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC21224F442200316608 /* DefaultSizes+tvOS.swift */; }; 27 | 224BAC5E224FF37C00316608 /* DefaultSizes+watchOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC22224F442200316608 /* DefaultSizes+watchOS.swift */; }; 28 | 224BAC5F224FF4B500316608 /* TestFonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC3B224F459500316608 /* TestFonts.swift */; }; 29 | 224BAC60224FF4B500316608 /* SystemFontTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC35224F44AE00316608 /* SystemFontTests.swift */; }; 30 | 224BAC61224FF4B500316608 /* CustomFontTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC36224F44AE00316608 /* CustomFontTests.swift */; }; 31 | 224BAC6F224FF64C00316608 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2C224F443700316608 /* Font.swift */; }; 32 | 224BAC70224FF64C00316608 /* SystemFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2A224F443700316608 /* SystemFont.swift */; }; 33 | 224BAC71224FF64C00316608 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC2B224F443700316608 /* Utils.swift */; }; 34 | 224BAC72224FF64C00316608 /* DefaultSizes+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC23224F442200316608 /* DefaultSizes+iOS.swift */; }; 35 | 224BAC73224FF64C00316608 /* DefaultSizes+tvOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC21224F442200316608 /* DefaultSizes+tvOS.swift */; }; 36 | 224BAC74224FF64C00316608 /* DefaultSizes+watchOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224BAC22224F442200316608 /* DefaultSizes+watchOS.swift */; }; 37 | 224BAC75224FF65300316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; }; 38 | 224BAC76224FF65400316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; }; 39 | 22886BA8242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 40 | 22886BA9242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 41 | 22886BAA242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 42 | 22886BAB242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 43 | 22886BAC242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 44 | /* End PBXBuildFile section */ 45 | 46 | /* Begin PBXContainerItemProxy section */ 47 | 224BAC0E224F41F200316608 /* PBXContainerItemProxy */ = { 48 | isa = PBXContainerItemProxy; 49 | containerPortal = 224BABFA224F41F100316608 /* Project object */; 50 | proxyType = 1; 51 | remoteGlobalIDString = 224BAC02224F41F100316608; 52 | remoteInfo = Swash; 53 | }; 54 | 224BAC4C224FF35400316608 /* PBXContainerItemProxy */ = { 55 | isa = PBXContainerItemProxy; 56 | containerPortal = 224BABFA224F41F100316608 /* Project object */; 57 | proxyType = 1; 58 | remoteGlobalIDString = 224BAC41224FF35300316608; 59 | remoteInfo = "Swash tvOS"; 60 | }; 61 | /* End PBXContainerItemProxy section */ 62 | 63 | /* Begin PBXFileReference section */ 64 | 224BAC03224F41F100316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | 224BAC06224F41F100316608 /* Swash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Swash.h; sourceTree = ""; }; 66 | 224BAC07224F41F100316608 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | 224BAC0C224F41F200316608 /* Swash iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Swash iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | 224BAC21224F442200316608 /* DefaultSizes+tvOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DefaultSizes+tvOS.swift"; sourceTree = ""; }; 69 | 224BAC22224F442200316608 /* DefaultSizes+watchOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DefaultSizes+watchOS.swift"; sourceTree = ""; }; 70 | 224BAC23224F442200316608 /* DefaultSizes+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DefaultSizes+iOS.swift"; sourceTree = ""; }; 71 | 224BAC2A224F443700316608 /* SystemFont.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SystemFont.swift; sourceTree = ""; }; 72 | 224BAC2B224F443700316608 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; 73 | 224BAC2C224F443700316608 /* Font.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Font.swift; sourceTree = ""; }; 74 | 224BAC35224F44AE00316608 /* SystemFontTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SystemFontTests.swift; sourceTree = ""; }; 75 | 224BAC36224F44AE00316608 /* CustomFontTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomFontTests.swift; sourceTree = ""; }; 76 | 224BAC37224F44AE00316608 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 77 | 224BAC3B224F459500316608 /* TestFonts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestFonts.swift; sourceTree = ""; }; 78 | 224BAC42224FF35300316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 79 | 224BAC4A224FF35400316608 /* Swash tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Swash tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | 224BAC67224FF62200316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | 224BAC78224FF84600316608 /* Swash.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Swash.podspec; sourceTree = ""; }; 82 | 224BAC79224FF85D00316608 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 83 | 224BAC98224FFE7400316608 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 84 | 224BAC99224FFEB900316608 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; 85 | 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CascadingFontProperties.swift; sourceTree = ""; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | 224BAC00224F41F100316608 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 224BAC09224F41F200316608 /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | 224BAC0D224F41F200316608 /* Swash.framework in Frameworks */, 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | 224BAC3F224FF35300316608 /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | 224BAC47224FF35400316608 /* Frameworks */ = { 112 | isa = PBXFrameworksBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | 224BAC4B224FF35400316608 /* Swash.framework in Frameworks */, 116 | ); 117 | runOnlyForDeploymentPostprocessing = 0; 118 | }; 119 | 224BAC64224FF62200316608 /* Frameworks */ = { 120 | isa = PBXFrameworksBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | ); 124 | runOnlyForDeploymentPostprocessing = 0; 125 | }; 126 | /* End PBXFrameworksBuildPhase section */ 127 | 128 | /* Begin PBXGroup section */ 129 | 224BABF9224F41F100316608 = { 130 | isa = PBXGroup; 131 | children = ( 132 | 224BAC77224FF82C00316608 /* Deployment */, 133 | 224BAC05224F41F100316608 /* Source */, 134 | 224BAC34224F44AE00316608 /* Tests */, 135 | 224BAC04224F41F100316608 /* Products */, 136 | ); 137 | sourceTree = ""; 138 | }; 139 | 224BAC04224F41F100316608 /* Products */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 224BAC03224F41F100316608 /* Swash.framework */, 143 | 224BAC0C224F41F200316608 /* Swash iOS Tests.xctest */, 144 | 224BAC42224FF35300316608 /* Swash.framework */, 145 | 224BAC4A224FF35400316608 /* Swash tvOS Tests.xctest */, 146 | 224BAC67224FF62200316608 /* Swash.framework */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | 224BAC05224F41F100316608 /* Source */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 224BAC2C224F443700316608 /* Font.swift */, 155 | 224BAC2A224F443700316608 /* SystemFont.swift */, 156 | 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */, 157 | 224BAC2B224F443700316608 /* Utils.swift */, 158 | 224BAC20224F43F200316608 /* Default Sizes */, 159 | 224BAC33224F444B00316608 /* Supporting Files */, 160 | ); 161 | path = Source; 162 | sourceTree = ""; 163 | }; 164 | 224BAC20224F43F200316608 /* Default Sizes */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | 224BAC23224F442200316608 /* DefaultSizes+iOS.swift */, 168 | 224BAC21224F442200316608 /* DefaultSizes+tvOS.swift */, 169 | 224BAC22224F442200316608 /* DefaultSizes+watchOS.swift */, 170 | ); 171 | path = "Default Sizes"; 172 | sourceTree = ""; 173 | }; 174 | 224BAC33224F444B00316608 /* Supporting Files */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 224BAC06224F41F100316608 /* Swash.h */, 178 | 224BAC07224F41F100316608 /* Info.plist */, 179 | ); 180 | path = "Supporting Files"; 181 | sourceTree = ""; 182 | }; 183 | 224BAC34224F44AE00316608 /* Tests */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 224BAC3B224F459500316608 /* TestFonts.swift */, 187 | 224BAC35224F44AE00316608 /* SystemFontTests.swift */, 188 | 224BAC36224F44AE00316608 /* CustomFontTests.swift */, 189 | 224BAC37224F44AE00316608 /* Info.plist */, 190 | ); 191 | path = Tests; 192 | sourceTree = ""; 193 | }; 194 | 224BAC77224FF82C00316608 /* Deployment */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 224BAC98224FFE7400316608 /* README.md */, 198 | 224BAC99224FFEB900316608 /* CHANGELOG.md */, 199 | 224BAC78224FF84600316608 /* Swash.podspec */, 200 | 224BAC79224FF85D00316608 /* LICENSE */, 201 | ); 202 | name = Deployment; 203 | sourceTree = ""; 204 | }; 205 | /* End PBXGroup section */ 206 | 207 | /* Begin PBXHeadersBuildPhase section */ 208 | 224BABFE224F41F100316608 /* Headers */ = { 209 | isa = PBXHeadersBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 224BAC14224F41F200316608 /* Swash.h in Headers */, 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | 224BAC3D224FF35300316608 /* Headers */ = { 217 | isa = PBXHeadersBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 224BAC75224FF65300316608 /* Swash.h in Headers */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | 224BAC62224FF62200316608 /* Headers */ = { 225 | isa = PBXHeadersBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | 224BAC76224FF65400316608 /* Swash.h in Headers */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXHeadersBuildPhase section */ 233 | 234 | /* Begin PBXNativeTarget section */ 235 | 224BAC02224F41F100316608 /* Swash iOS */ = { 236 | isa = PBXNativeTarget; 237 | buildConfigurationList = 224BAC17224F41F200316608 /* Build configuration list for PBXNativeTarget "Swash iOS" */; 238 | buildPhases = ( 239 | 224BABFE224F41F100316608 /* Headers */, 240 | 224BABFF224F41F100316608 /* Sources */, 241 | 224BAC00224F41F100316608 /* Frameworks */, 242 | 224BAC01224F41F100316608 /* Resources */, 243 | ); 244 | buildRules = ( 245 | ); 246 | dependencies = ( 247 | ); 248 | name = "Swash iOS"; 249 | productName = Swash; 250 | productReference = 224BAC03224F41F100316608 /* Swash.framework */; 251 | productType = "com.apple.product-type.framework"; 252 | }; 253 | 224BAC0B224F41F200316608 /* Swash iOS Tests */ = { 254 | isa = PBXNativeTarget; 255 | buildConfigurationList = 224BAC1A224F41F200316608 /* Build configuration list for PBXNativeTarget "Swash iOS Tests" */; 256 | buildPhases = ( 257 | 224BAC08224F41F200316608 /* Sources */, 258 | 224BAC09224F41F200316608 /* Frameworks */, 259 | 224BAC0A224F41F200316608 /* Resources */, 260 | ); 261 | buildRules = ( 262 | ); 263 | dependencies = ( 264 | 224BAC0F224F41F200316608 /* PBXTargetDependency */, 265 | ); 266 | name = "Swash iOS Tests"; 267 | productName = SwashTests; 268 | productReference = 224BAC0C224F41F200316608 /* Swash iOS Tests.xctest */; 269 | productType = "com.apple.product-type.bundle.unit-test"; 270 | }; 271 | 224BAC41224FF35300316608 /* Swash tvOS */ = { 272 | isa = PBXNativeTarget; 273 | buildConfigurationList = 224BAC53224FF35400316608 /* Build configuration list for PBXNativeTarget "Swash tvOS" */; 274 | buildPhases = ( 275 | 224BAC3D224FF35300316608 /* Headers */, 276 | 224BAC3E224FF35300316608 /* Sources */, 277 | 224BAC3F224FF35300316608 /* Frameworks */, 278 | 224BAC40224FF35300316608 /* Resources */, 279 | ); 280 | buildRules = ( 281 | ); 282 | dependencies = ( 283 | ); 284 | name = "Swash tvOS"; 285 | productName = "Swash tvOS"; 286 | productReference = 224BAC42224FF35300316608 /* Swash.framework */; 287 | productType = "com.apple.product-type.framework"; 288 | }; 289 | 224BAC49224FF35400316608 /* Swash tvOS Tests */ = { 290 | isa = PBXNativeTarget; 291 | buildConfigurationList = 224BAC56224FF35400316608 /* Build configuration list for PBXNativeTarget "Swash tvOS Tests" */; 292 | buildPhases = ( 293 | 224BAC46224FF35400316608 /* Sources */, 294 | 224BAC47224FF35400316608 /* Frameworks */, 295 | 224BAC48224FF35400316608 /* Resources */, 296 | ); 297 | buildRules = ( 298 | ); 299 | dependencies = ( 300 | 224BAC4D224FF35400316608 /* PBXTargetDependency */, 301 | ); 302 | name = "Swash tvOS Tests"; 303 | productName = "Swash tvOSTests"; 304 | productReference = 224BAC4A224FF35400316608 /* Swash tvOS Tests.xctest */; 305 | productType = "com.apple.product-type.bundle.unit-test"; 306 | }; 307 | 224BAC66224FF62200316608 /* Swash watchOS */ = { 308 | isa = PBXNativeTarget; 309 | buildConfigurationList = 224BAC6C224FF62200316608 /* Build configuration list for PBXNativeTarget "Swash watchOS" */; 310 | buildPhases = ( 311 | 224BAC62224FF62200316608 /* Headers */, 312 | 224BAC63224FF62200316608 /* Sources */, 313 | 224BAC64224FF62200316608 /* Frameworks */, 314 | 224BAC65224FF62200316608 /* Resources */, 315 | ); 316 | buildRules = ( 317 | ); 318 | dependencies = ( 319 | ); 320 | name = "Swash watchOS"; 321 | productName = "Swash watchOS"; 322 | productReference = 224BAC67224FF62200316608 /* Swash.framework */; 323 | productType = "com.apple.product-type.framework"; 324 | }; 325 | /* End PBXNativeTarget section */ 326 | 327 | /* Begin PBXProject section */ 328 | 224BABFA224F41F100316608 /* Project object */ = { 329 | isa = PBXProject; 330 | attributes = { 331 | LastSwiftUpdateCheck = 1020; 332 | LastUpgradeCheck = 1020; 333 | ORGANIZATIONNAME = Mindgrub; 334 | TargetAttributes = { 335 | 224BAC02224F41F100316608 = { 336 | CreatedOnToolsVersion = 10.2; 337 | LastSwiftMigration = 1020; 338 | }; 339 | 224BAC0B224F41F200316608 = { 340 | CreatedOnToolsVersion = 10.2; 341 | }; 342 | 224BAC41224FF35300316608 = { 343 | CreatedOnToolsVersion = 10.2; 344 | }; 345 | 224BAC49224FF35400316608 = { 346 | CreatedOnToolsVersion = 10.2; 347 | }; 348 | 224BAC66224FF62200316608 = { 349 | CreatedOnToolsVersion = 10.2; 350 | }; 351 | }; 352 | }; 353 | buildConfigurationList = 224BABFD224F41F100316608 /* Build configuration list for PBXProject "Swash" */; 354 | compatibilityVersion = "Xcode 9.3"; 355 | developmentRegion = en; 356 | hasScannedForEncodings = 0; 357 | knownRegions = ( 358 | en, 359 | Base, 360 | ); 361 | mainGroup = 224BABF9224F41F100316608; 362 | productRefGroup = 224BAC04224F41F100316608 /* Products */; 363 | projectDirPath = ""; 364 | projectRoot = ""; 365 | targets = ( 366 | 224BAC02224F41F100316608 /* Swash iOS */, 367 | 224BAC0B224F41F200316608 /* Swash iOS Tests */, 368 | 224BAC41224FF35300316608 /* Swash tvOS */, 369 | 224BAC49224FF35400316608 /* Swash tvOS Tests */, 370 | 224BAC66224FF62200316608 /* Swash watchOS */, 371 | ); 372 | }; 373 | /* End PBXProject section */ 374 | 375 | /* Begin PBXResourcesBuildPhase section */ 376 | 224BAC01224F41F100316608 /* Resources */ = { 377 | isa = PBXResourcesBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | }; 383 | 224BAC0A224F41F200316608 /* Resources */ = { 384 | isa = PBXResourcesBuildPhase; 385 | buildActionMask = 2147483647; 386 | files = ( 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | 224BAC40224FF35300316608 /* Resources */ = { 391 | isa = PBXResourcesBuildPhase; 392 | buildActionMask = 2147483647; 393 | files = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | 224BAC48224FF35400316608 /* Resources */ = { 398 | isa = PBXResourcesBuildPhase; 399 | buildActionMask = 2147483647; 400 | files = ( 401 | ); 402 | runOnlyForDeploymentPostprocessing = 0; 403 | }; 404 | 224BAC65224FF62200316608 /* Resources */ = { 405 | isa = PBXResourcesBuildPhase; 406 | buildActionMask = 2147483647; 407 | files = ( 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXResourcesBuildPhase section */ 412 | 413 | /* Begin PBXSourcesBuildPhase section */ 414 | 224BABFF224F41F100316608 /* Sources */ = { 415 | isa = PBXSourcesBuildPhase; 416 | buildActionMask = 2147483647; 417 | files = ( 418 | 224BAC2F224F443700316608 /* Utils.swift in Sources */, 419 | 224BAC28224F442200316608 /* DefaultSizes+iOS.swift in Sources */, 420 | 224BAC31224F443700316608 /* Font.swift in Sources */, 421 | 224BAC26224F442200316608 /* DefaultSizes+watchOS.swift in Sources */, 422 | 224BAC24224F442200316608 /* DefaultSizes+tvOS.swift in Sources */, 423 | 224BAC2D224F443700316608 /* SystemFont.swift in Sources */, 424 | 22886BA8242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 425 | ); 426 | runOnlyForDeploymentPostprocessing = 0; 427 | }; 428 | 224BAC08224F41F200316608 /* Sources */ = { 429 | isa = PBXSourcesBuildPhase; 430 | buildActionMask = 2147483647; 431 | files = ( 432 | 224BAC3C224F459500316608 /* TestFonts.swift in Sources */, 433 | 22886BA9242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 434 | 224BAC39224F44AE00316608 /* CustomFontTests.swift in Sources */, 435 | 224BAC38224F44AE00316608 /* SystemFontTests.swift in Sources */, 436 | ); 437 | runOnlyForDeploymentPostprocessing = 0; 438 | }; 439 | 224BAC3E224FF35300316608 /* Sources */ = { 440 | isa = PBXSourcesBuildPhase; 441 | buildActionMask = 2147483647; 442 | files = ( 443 | 224BAC5E224FF37C00316608 /* DefaultSizes+watchOS.swift in Sources */, 444 | 224BAC59224FF37C00316608 /* Font.swift in Sources */, 445 | 224BAC5A224FF37C00316608 /* SystemFont.swift in Sources */, 446 | 224BAC5C224FF37C00316608 /* DefaultSizes+iOS.swift in Sources */, 447 | 224BAC5B224FF37C00316608 /* Utils.swift in Sources */, 448 | 224BAC5D224FF37C00316608 /* DefaultSizes+tvOS.swift in Sources */, 449 | 22886BAA242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 450 | ); 451 | runOnlyForDeploymentPostprocessing = 0; 452 | }; 453 | 224BAC46224FF35400316608 /* Sources */ = { 454 | isa = PBXSourcesBuildPhase; 455 | buildActionMask = 2147483647; 456 | files = ( 457 | 224BAC5F224FF4B500316608 /* TestFonts.swift in Sources */, 458 | 22886BAB242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 459 | 224BAC61224FF4B500316608 /* CustomFontTests.swift in Sources */, 460 | 224BAC60224FF4B500316608 /* SystemFontTests.swift in Sources */, 461 | ); 462 | runOnlyForDeploymentPostprocessing = 0; 463 | }; 464 | 224BAC63224FF62200316608 /* Sources */ = { 465 | isa = PBXSourcesBuildPhase; 466 | buildActionMask = 2147483647; 467 | files = ( 468 | 224BAC74224FF64C00316608 /* DefaultSizes+watchOS.swift in Sources */, 469 | 224BAC6F224FF64C00316608 /* Font.swift in Sources */, 470 | 224BAC70224FF64C00316608 /* SystemFont.swift in Sources */, 471 | 224BAC72224FF64C00316608 /* DefaultSizes+iOS.swift in Sources */, 472 | 224BAC71224FF64C00316608 /* Utils.swift in Sources */, 473 | 224BAC73224FF64C00316608 /* DefaultSizes+tvOS.swift in Sources */, 474 | 22886BAC242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 475 | ); 476 | runOnlyForDeploymentPostprocessing = 0; 477 | }; 478 | /* End PBXSourcesBuildPhase section */ 479 | 480 | /* Begin PBXTargetDependency section */ 481 | 224BAC0F224F41F200316608 /* PBXTargetDependency */ = { 482 | isa = PBXTargetDependency; 483 | target = 224BAC02224F41F100316608 /* Swash iOS */; 484 | targetProxy = 224BAC0E224F41F200316608 /* PBXContainerItemProxy */; 485 | }; 486 | 224BAC4D224FF35400316608 /* PBXTargetDependency */ = { 487 | isa = PBXTargetDependency; 488 | target = 224BAC41224FF35300316608 /* Swash tvOS */; 489 | targetProxy = 224BAC4C224FF35400316608 /* PBXContainerItemProxy */; 490 | }; 491 | /* End PBXTargetDependency section */ 492 | 493 | /* Begin XCBuildConfiguration section */ 494 | 224BAC15224F41F200316608 /* Debug */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | ALWAYS_SEARCH_USER_PATHS = NO; 498 | CLANG_ANALYZER_NONNULL = YES; 499 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 500 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 501 | CLANG_CXX_LIBRARY = "libc++"; 502 | CLANG_ENABLE_MODULES = YES; 503 | CLANG_ENABLE_OBJC_ARC = YES; 504 | CLANG_ENABLE_OBJC_WEAK = YES; 505 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 506 | CLANG_WARN_BOOL_CONVERSION = YES; 507 | CLANG_WARN_COMMA = YES; 508 | CLANG_WARN_CONSTANT_CONVERSION = YES; 509 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 510 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 511 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 512 | CLANG_WARN_EMPTY_BODY = YES; 513 | CLANG_WARN_ENUM_CONVERSION = YES; 514 | CLANG_WARN_INFINITE_RECURSION = YES; 515 | CLANG_WARN_INT_CONVERSION = YES; 516 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 517 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 518 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 519 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 520 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 521 | CLANG_WARN_STRICT_PROTOTYPES = YES; 522 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 523 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 524 | CLANG_WARN_UNREACHABLE_CODE = YES; 525 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 526 | CODE_SIGN_IDENTITY = "iPhone Developer"; 527 | COPY_PHASE_STRIP = NO; 528 | CURRENT_PROJECT_VERSION = 1; 529 | DEBUG_INFORMATION_FORMAT = dwarf; 530 | ENABLE_STRICT_OBJC_MSGSEND = YES; 531 | ENABLE_TESTABILITY = YES; 532 | GCC_C_LANGUAGE_STANDARD = gnu11; 533 | GCC_DYNAMIC_NO_PIC = NO; 534 | GCC_NO_COMMON_BLOCKS = YES; 535 | GCC_OPTIMIZATION_LEVEL = 0; 536 | GCC_PREPROCESSOR_DEFINITIONS = ( 537 | "DEBUG=1", 538 | "$(inherited)", 539 | ); 540 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 541 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 542 | GCC_WARN_UNDECLARED_SELECTOR = YES; 543 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 544 | GCC_WARN_UNUSED_FUNCTION = YES; 545 | GCC_WARN_UNUSED_VARIABLE = YES; 546 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 547 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 548 | MTL_FAST_MATH = YES; 549 | ONLY_ACTIVE_ARCH = YES; 550 | SDKROOT = iphoneos; 551 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 552 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 553 | TARGETED_DEVICE_FAMILY = "1,2"; 554 | VERSIONING_SYSTEM = "apple-generic"; 555 | VERSION_INFO_PREFIX = ""; 556 | }; 557 | name = Debug; 558 | }; 559 | 224BAC16224F41F200316608 /* Release */ = { 560 | isa = XCBuildConfiguration; 561 | buildSettings = { 562 | ALWAYS_SEARCH_USER_PATHS = NO; 563 | CLANG_ANALYZER_NONNULL = YES; 564 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 565 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 566 | CLANG_CXX_LIBRARY = "libc++"; 567 | CLANG_ENABLE_MODULES = YES; 568 | CLANG_ENABLE_OBJC_ARC = YES; 569 | CLANG_ENABLE_OBJC_WEAK = YES; 570 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 571 | CLANG_WARN_BOOL_CONVERSION = YES; 572 | CLANG_WARN_COMMA = YES; 573 | CLANG_WARN_CONSTANT_CONVERSION = YES; 574 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 575 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 576 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 577 | CLANG_WARN_EMPTY_BODY = YES; 578 | CLANG_WARN_ENUM_CONVERSION = YES; 579 | CLANG_WARN_INFINITE_RECURSION = YES; 580 | CLANG_WARN_INT_CONVERSION = YES; 581 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 582 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 583 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 584 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 585 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 586 | CLANG_WARN_STRICT_PROTOTYPES = YES; 587 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 588 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 589 | CLANG_WARN_UNREACHABLE_CODE = YES; 590 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 591 | CODE_SIGN_IDENTITY = "iPhone Developer"; 592 | COPY_PHASE_STRIP = NO; 593 | CURRENT_PROJECT_VERSION = 1; 594 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 595 | ENABLE_NS_ASSERTIONS = NO; 596 | ENABLE_STRICT_OBJC_MSGSEND = YES; 597 | GCC_C_LANGUAGE_STANDARD = gnu11; 598 | GCC_NO_COMMON_BLOCKS = YES; 599 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 600 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 601 | GCC_WARN_UNDECLARED_SELECTOR = YES; 602 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 603 | GCC_WARN_UNUSED_FUNCTION = YES; 604 | GCC_WARN_UNUSED_VARIABLE = YES; 605 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 606 | MTL_ENABLE_DEBUG_INFO = NO; 607 | MTL_FAST_MATH = YES; 608 | SDKROOT = iphoneos; 609 | SWIFT_COMPILATION_MODE = wholemodule; 610 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 611 | TARGETED_DEVICE_FAMILY = "1,2"; 612 | VALIDATE_PRODUCT = YES; 613 | VERSIONING_SYSTEM = "apple-generic"; 614 | VERSION_INFO_PREFIX = ""; 615 | }; 616 | name = Release; 617 | }; 618 | 224BAC18224F41F200316608 /* Debug */ = { 619 | isa = XCBuildConfiguration; 620 | buildSettings = { 621 | APPLICATION_EXTENSION_API_ONLY = YES; 622 | CLANG_ENABLE_MODULES = YES; 623 | CODE_SIGN_IDENTITY = ""; 624 | CODE_SIGN_STYLE = Automatic; 625 | DEFINES_MODULE = YES; 626 | DYLIB_COMPATIBILITY_VERSION = 1; 627 | DYLIB_CURRENT_VERSION = 1; 628 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 629 | INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; 630 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 631 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 632 | LD_RUNPATH_SEARCH_PATHS = ( 633 | "$(inherited)", 634 | "@executable_path/Frameworks", 635 | "@loader_path/Frameworks", 636 | ); 637 | MARKETING_VERSION = 4.0.0; 638 | PRODUCT_BUNDLE_IDENTIFIER = com.mindgrub.Swash; 639 | PRODUCT_NAME = Swash; 640 | SKIP_INSTALL = YES; 641 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 642 | SWIFT_VERSION = 5.0; 643 | TARGETED_DEVICE_FAMILY = "1,2"; 644 | }; 645 | name = Debug; 646 | }; 647 | 224BAC19224F41F200316608 /* Release */ = { 648 | isa = XCBuildConfiguration; 649 | buildSettings = { 650 | APPLICATION_EXTENSION_API_ONLY = YES; 651 | CLANG_ENABLE_MODULES = YES; 652 | CODE_SIGN_IDENTITY = ""; 653 | CODE_SIGN_STYLE = Automatic; 654 | DEFINES_MODULE = YES; 655 | DYLIB_COMPATIBILITY_VERSION = 1; 656 | DYLIB_CURRENT_VERSION = 1; 657 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 658 | INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; 659 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 660 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 661 | LD_RUNPATH_SEARCH_PATHS = ( 662 | "$(inherited)", 663 | "@executable_path/Frameworks", 664 | "@loader_path/Frameworks", 665 | ); 666 | MARKETING_VERSION = 4.0.0; 667 | PRODUCT_BUNDLE_IDENTIFIER = com.mindgrub.Swash; 668 | PRODUCT_NAME = Swash; 669 | SKIP_INSTALL = YES; 670 | SWIFT_VERSION = 5.0; 671 | TARGETED_DEVICE_FAMILY = "1,2"; 672 | }; 673 | name = Release; 674 | }; 675 | 224BAC1B224F41F200316608 /* Debug */ = { 676 | isa = XCBuildConfiguration; 677 | buildSettings = { 678 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 679 | CODE_SIGN_STYLE = Automatic; 680 | INFOPLIST_FILE = Tests/Info.plist; 681 | LD_RUNPATH_SEARCH_PATHS = ( 682 | "$(inherited)", 683 | "@executable_path/Frameworks", 684 | "@loader_path/Frameworks", 685 | ); 686 | PRODUCT_BUNDLE_IDENTIFIER = com.Mindgrub.SwashTests; 687 | PRODUCT_NAME = "$(TARGET_NAME)"; 688 | SWIFT_VERSION = 5.0; 689 | TARGETED_DEVICE_FAMILY = "1,2"; 690 | }; 691 | name = Debug; 692 | }; 693 | 224BAC1C224F41F200316608 /* Release */ = { 694 | isa = XCBuildConfiguration; 695 | buildSettings = { 696 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 697 | CODE_SIGN_STYLE = Automatic; 698 | INFOPLIST_FILE = Tests/Info.plist; 699 | LD_RUNPATH_SEARCH_PATHS = ( 700 | "$(inherited)", 701 | "@executable_path/Frameworks", 702 | "@loader_path/Frameworks", 703 | ); 704 | PRODUCT_BUNDLE_IDENTIFIER = com.Mindgrub.SwashTests; 705 | PRODUCT_NAME = "$(TARGET_NAME)"; 706 | SWIFT_VERSION = 5.0; 707 | TARGETED_DEVICE_FAMILY = "1,2"; 708 | }; 709 | name = Release; 710 | }; 711 | 224BAC54224FF35400316608 /* Debug */ = { 712 | isa = XCBuildConfiguration; 713 | buildSettings = { 714 | APPLICATION_EXTENSION_API_ONLY = YES; 715 | CODE_SIGN_IDENTITY = ""; 716 | CODE_SIGN_STYLE = Automatic; 717 | DEFINES_MODULE = YES; 718 | DYLIB_COMPATIBILITY_VERSION = 1; 719 | DYLIB_CURRENT_VERSION = 1; 720 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 721 | INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; 722 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 723 | LD_RUNPATH_SEARCH_PATHS = ( 724 | "$(inherited)", 725 | "@executable_path/Frameworks", 726 | "@loader_path/Frameworks", 727 | ); 728 | MARKETING_VERSION = 4.0.0; 729 | PRODUCT_BUNDLE_IDENTIFIER = com.mindgrub.Swash; 730 | PRODUCT_NAME = Swash; 731 | SDKROOT = appletvos; 732 | SKIP_INSTALL = YES; 733 | SWIFT_VERSION = 5.0; 734 | TARGETED_DEVICE_FAMILY = 3; 735 | TVOS_DEPLOYMENT_TARGET = 9.0; 736 | }; 737 | name = Debug; 738 | }; 739 | 224BAC55224FF35400316608 /* Release */ = { 740 | isa = XCBuildConfiguration; 741 | buildSettings = { 742 | APPLICATION_EXTENSION_API_ONLY = YES; 743 | CODE_SIGN_IDENTITY = ""; 744 | CODE_SIGN_STYLE = Automatic; 745 | DEFINES_MODULE = YES; 746 | DYLIB_COMPATIBILITY_VERSION = 1; 747 | DYLIB_CURRENT_VERSION = 1; 748 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 749 | INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; 750 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 751 | LD_RUNPATH_SEARCH_PATHS = ( 752 | "$(inherited)", 753 | "@executable_path/Frameworks", 754 | "@loader_path/Frameworks", 755 | ); 756 | MARKETING_VERSION = 4.0.0; 757 | PRODUCT_BUNDLE_IDENTIFIER = com.mindgrub.Swash; 758 | PRODUCT_NAME = Swash; 759 | SDKROOT = appletvos; 760 | SKIP_INSTALL = YES; 761 | SWIFT_VERSION = 5.0; 762 | TARGETED_DEVICE_FAMILY = 3; 763 | TVOS_DEPLOYMENT_TARGET = 9.0; 764 | }; 765 | name = Release; 766 | }; 767 | 224BAC57224FF35400316608 /* Debug */ = { 768 | isa = XCBuildConfiguration; 769 | buildSettings = { 770 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 771 | CODE_SIGN_STYLE = Automatic; 772 | INFOPLIST_FILE = Tests/Info.plist; 773 | LD_RUNPATH_SEARCH_PATHS = ( 774 | "$(inherited)", 775 | "@executable_path/Frameworks", 776 | "@loader_path/Frameworks", 777 | ); 778 | PRODUCT_BUNDLE_IDENTIFIER = "com.Mindgrub.Swash-tvOSTests"; 779 | PRODUCT_NAME = "$(TARGET_NAME)"; 780 | SDKROOT = appletvos; 781 | SWIFT_VERSION = 5.0; 782 | TARGETED_DEVICE_FAMILY = 3; 783 | TVOS_DEPLOYMENT_TARGET = 12.2; 784 | }; 785 | name = Debug; 786 | }; 787 | 224BAC58224FF35400316608 /* Release */ = { 788 | isa = XCBuildConfiguration; 789 | buildSettings = { 790 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 791 | CODE_SIGN_STYLE = Automatic; 792 | INFOPLIST_FILE = Tests/Info.plist; 793 | LD_RUNPATH_SEARCH_PATHS = ( 794 | "$(inherited)", 795 | "@executable_path/Frameworks", 796 | "@loader_path/Frameworks", 797 | ); 798 | PRODUCT_BUNDLE_IDENTIFIER = "com.Mindgrub.Swash-tvOSTests"; 799 | PRODUCT_NAME = "$(TARGET_NAME)"; 800 | SDKROOT = appletvos; 801 | SWIFT_VERSION = 5.0; 802 | TARGETED_DEVICE_FAMILY = 3; 803 | TVOS_DEPLOYMENT_TARGET = 12.2; 804 | }; 805 | name = Release; 806 | }; 807 | 224BAC6D224FF62200316608 /* Debug */ = { 808 | isa = XCBuildConfiguration; 809 | buildSettings = { 810 | APPLICATION_EXTENSION_API_ONLY = YES; 811 | CODE_SIGN_IDENTITY = ""; 812 | CODE_SIGN_STYLE = Automatic; 813 | DEFINES_MODULE = YES; 814 | DYLIB_COMPATIBILITY_VERSION = 1; 815 | DYLIB_CURRENT_VERSION = 1; 816 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 817 | INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; 818 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 819 | LD_RUNPATH_SEARCH_PATHS = ( 820 | "$(inherited)", 821 | "@executable_path/Frameworks", 822 | "@loader_path/Frameworks", 823 | ); 824 | MARKETING_VERSION = 4.0.0; 825 | PRODUCT_BUNDLE_IDENTIFIER = com.mindgrub.Swash; 826 | PRODUCT_NAME = Swash; 827 | SDKROOT = watchos; 828 | SKIP_INSTALL = YES; 829 | SWIFT_VERSION = 5.0; 830 | TARGETED_DEVICE_FAMILY = 4; 831 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 832 | }; 833 | name = Debug; 834 | }; 835 | 224BAC6E224FF62200316608 /* Release */ = { 836 | isa = XCBuildConfiguration; 837 | buildSettings = { 838 | APPLICATION_EXTENSION_API_ONLY = YES; 839 | CODE_SIGN_IDENTITY = ""; 840 | CODE_SIGN_STYLE = Automatic; 841 | DEFINES_MODULE = YES; 842 | DYLIB_COMPATIBILITY_VERSION = 1; 843 | DYLIB_CURRENT_VERSION = 1; 844 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 845 | INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; 846 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 847 | LD_RUNPATH_SEARCH_PATHS = ( 848 | "$(inherited)", 849 | "@executable_path/Frameworks", 850 | "@loader_path/Frameworks", 851 | ); 852 | MARKETING_VERSION = 4.0.0; 853 | PRODUCT_BUNDLE_IDENTIFIER = com.mindgrub.Swash; 854 | PRODUCT_NAME = Swash; 855 | SDKROOT = watchos; 856 | SKIP_INSTALL = YES; 857 | SWIFT_VERSION = 5.0; 858 | TARGETED_DEVICE_FAMILY = 4; 859 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 860 | }; 861 | name = Release; 862 | }; 863 | /* End XCBuildConfiguration section */ 864 | 865 | /* Begin XCConfigurationList section */ 866 | 224BABFD224F41F100316608 /* Build configuration list for PBXProject "Swash" */ = { 867 | isa = XCConfigurationList; 868 | buildConfigurations = ( 869 | 224BAC15224F41F200316608 /* Debug */, 870 | 224BAC16224F41F200316608 /* Release */, 871 | ); 872 | defaultConfigurationIsVisible = 0; 873 | defaultConfigurationName = Release; 874 | }; 875 | 224BAC17224F41F200316608 /* Build configuration list for PBXNativeTarget "Swash iOS" */ = { 876 | isa = XCConfigurationList; 877 | buildConfigurations = ( 878 | 224BAC18224F41F200316608 /* Debug */, 879 | 224BAC19224F41F200316608 /* Release */, 880 | ); 881 | defaultConfigurationIsVisible = 0; 882 | defaultConfigurationName = Release; 883 | }; 884 | 224BAC1A224F41F200316608 /* Build configuration list for PBXNativeTarget "Swash iOS Tests" */ = { 885 | isa = XCConfigurationList; 886 | buildConfigurations = ( 887 | 224BAC1B224F41F200316608 /* Debug */, 888 | 224BAC1C224F41F200316608 /* Release */, 889 | ); 890 | defaultConfigurationIsVisible = 0; 891 | defaultConfigurationName = Release; 892 | }; 893 | 224BAC53224FF35400316608 /* Build configuration list for PBXNativeTarget "Swash tvOS" */ = { 894 | isa = XCConfigurationList; 895 | buildConfigurations = ( 896 | 224BAC54224FF35400316608 /* Debug */, 897 | 224BAC55224FF35400316608 /* Release */, 898 | ); 899 | defaultConfigurationIsVisible = 0; 900 | defaultConfigurationName = Release; 901 | }; 902 | 224BAC56224FF35400316608 /* Build configuration list for PBXNativeTarget "Swash tvOS Tests" */ = { 903 | isa = XCConfigurationList; 904 | buildConfigurations = ( 905 | 224BAC57224FF35400316608 /* Debug */, 906 | 224BAC58224FF35400316608 /* Release */, 907 | ); 908 | defaultConfigurationIsVisible = 0; 909 | defaultConfigurationName = Release; 910 | }; 911 | 224BAC6C224FF62200316608 /* Build configuration list for PBXNativeTarget "Swash watchOS" */ = { 912 | isa = XCConfigurationList; 913 | buildConfigurations = ( 914 | 224BAC6D224FF62200316608 /* Debug */, 915 | 224BAC6E224FF62200316608 /* Release */, 916 | ); 917 | defaultConfigurationIsVisible = 0; 918 | defaultConfigurationName = Release; 919 | }; 920 | /* End XCConfigurationList section */ 921 | }; 922 | rootObject = 224BABFA224F41F100316608 /* Project object */; 923 | } 924 | -------------------------------------------------------------------------------- /Swash.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Swash.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 37 | 38 | 44 | 45 | 47 | 48 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /Swash.xcodeproj/xcshareddata/xcschemes/Swash tvOS Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 37 | 38 | 44 | 45 | 47 | 48 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Swash.xcodeproj/xcshareddata/xcschemes/Swash tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /Swash.xcodeproj/xcshareddata/xcschemes/Swash watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Swash.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Swash.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Swash.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tests/CustomFontTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomFontTests.swift 3 | // Swash_Tests 4 | // 5 | // Created by Sam Francis on 7/21/18. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Swash 11 | 12 | class CustomFontTests: XCTestCase { 13 | 14 | //MARK: - Of Size 15 | 16 | func testOfSize() { 17 | let font = Avenir.roman.of(size: 23) 18 | XCTAssertEqual(font.pointSize, 23) 19 | XCTAssertEqual(font.fontName, "Avenir-Roman") 20 | } 21 | 22 | func testInvalidOfSize() { 23 | let font = InvalidFont.doesNotExist.of(size: 12) 24 | XCTAssertEqual(font.fontName, ".SFUI-Regular") 25 | } 26 | 27 | //MARK: - Dynamic Type 28 | 29 | func testOfTextStyle() { 30 | let font = Avenir.blackOblique.of(textStyle: .title1) 31 | XCTAssertEqual(font.fontName, "Avenir-BlackOblique") 32 | } 33 | 34 | func testOfTextStyleMax() { 35 | let font = Avenir.light.of(textStyle: .title2, maxSize: 30) 36 | XCTAssertEqual(font.fontName, "Avenir-Light") 37 | } 38 | 39 | func testOfTextStyleMaxDefault() { 40 | let font = Futura.condensedMedium.of(textStyle: .body, maxSize: 30, defaultSize: 17) 41 | XCTAssertEqual(font.fontName, "Futura-CondensedMedium") 42 | } 43 | 44 | func testInvalidOfTextStyle() { 45 | let font = InvalidFont.doesNotExist.of(textStyle: .footnote) 46 | XCTAssertEqual(font.fontName, ".SFUI-Regular") 47 | } 48 | 49 | //MARK: - Dynamic Type - Deprecated in iOS 11 50 | 51 | func testOfStyle() { 52 | let font = Futura.medium.of(style: .title3) 53 | XCTAssertEqual(font.fontName, "Futura-Medium") 54 | } 55 | 56 | func testOfStyleMax() { 57 | let font = Futura.medium.of(style: .title3, maxSize: 10) 58 | XCTAssertEqual(font.fontName, "Futura-Medium") 59 | } 60 | 61 | func testInvalidOfStyle() { 62 | let font = InvalidFont.doesNotExist.of(style: .caption1) 63 | XCTAssertEqual(font.fontName, ".SFUI-Regular") 64 | } 65 | 66 | //MARK: - Log Boilerplate 67 | 68 | func testLogBoilerplate() { 69 | Swash.logBoilerplate() 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/SystemFontTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SystemFontTests.swift 3 | // Swash_Tests 4 | // 5 | // Created by Sam Francis on 7/21/18. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Swash 11 | 12 | class SystemFontTests: XCTestCase { 13 | 14 | //MARK: - Of Size - Different Weights/Styles 15 | 16 | func testSystemPreferredOfSize() { 17 | let font = SystemFont.preferred.of(size: 12) 18 | XCTAssertEqual(font.pointSize, 12) 19 | XCTAssertEqual(font.fontName, ".SFUI-Regular") 20 | } 21 | 22 | func testSystemUltraLightOfSize() { 23 | let font = SystemFont.ultraLight.of(size: 14) 24 | XCTAssertEqual(font.pointSize, 14) 25 | XCTAssertEqual(font.fontName, ".SFUI-Ultralight") 26 | } 27 | 28 | func testSystemThinOfSize() { 29 | let font = SystemFont.thin.of(size: 11) 30 | XCTAssertEqual(font.pointSize, 11) 31 | XCTAssertEqual(font.fontName, ".SFUI-Thin") 32 | } 33 | 34 | func testSystemLightOfSize() { 35 | let font = SystemFont.light.of(size: 8) 36 | XCTAssertEqual(font.pointSize, 8) 37 | XCTAssertEqual(font.fontName, ".SFUI-Light") 38 | } 39 | 40 | func testSystemRegularOfSize() { 41 | let font = SystemFont.regular.of(size: 12) 42 | XCTAssertEqual(font.pointSize, 12) 43 | XCTAssertEqual(font.fontName, ".SFUI-Regular") 44 | } 45 | 46 | func testSystemMediumOfSize() { 47 | let font = SystemFont.medium.of(size: 12) 48 | XCTAssertEqual(font.pointSize, 12) 49 | XCTAssertEqual(font.fontName, ".SFUI-Medium") 50 | } 51 | 52 | func testSystemSemiboldOfSize() { 53 | let font = SystemFont.semibold.of(size: 12) 54 | XCTAssertEqual(font.pointSize, 12) 55 | XCTAssertEqual(font.fontName, ".SFUI-Semibold") 56 | } 57 | 58 | func testSystemBoldOfSize() { 59 | let font = SystemFont.bold.of(size: 12) 60 | XCTAssertEqual(font.pointSize, 12) 61 | XCTAssertEqual(font.fontName, ".SFUI-Bold") 62 | } 63 | 64 | func testSystemHeavyOfSize() { 65 | let font = SystemFont.heavy.of(size: 12) 66 | XCTAssertEqual(font.pointSize, 12) 67 | XCTAssertEqual(font.fontName, ".SFUI-Heavy") 68 | } 69 | 70 | func testSystemBlackOfSize() { 71 | let font = SystemFont.black.of(size: 12) 72 | XCTAssertEqual(font.pointSize, 12) 73 | XCTAssertEqual(font.fontName, ".SFUI-Black") 74 | } 75 | 76 | func testSystemItalicOfSize() { 77 | let font = SystemFont.italic.of(size: 12) 78 | XCTAssertEqual(font.pointSize, 12) 79 | XCTAssertEqual(font.fontName, ".SFUI-RegularItalic") 80 | } 81 | 82 | func testSystemSemiboldItalicOfSize() { 83 | let font = SystemFont.boldItalic.of(size: 12) 84 | XCTAssertEqual(font.pointSize, 12) 85 | #if(iOS) 86 | XCTAssertEqual(font.fontName, ".SFUI-SemiboldItalic") 87 | #elseif (tvOS) 88 | XCTAssertEqual(font.fontName, ".SFUI-BoldItalic") 89 | #endif 90 | } 91 | 92 | func testSystemCondensedOfSize() { 93 | let font = SystemFont.condensed.of(size: 12) 94 | XCTAssertEqual(font.pointSize, 12) 95 | XCTAssertEqual(font.fontName, ".SFUITextCondensed-Regular") 96 | } 97 | 98 | 99 | //MARK: - Dynamic Type 100 | 101 | func testSystemPreferredOfTextStyle() { 102 | #if(iOS) 103 | XCTAssertEqual(SystemFont.preferred.of(textStyle: .body).fontName, ".SFUI") 104 | #elseif (tvOS) 105 | XCTAssertEqual(SystemFont.preferred.of(textStyle: .body).fontName, ".SFUI-Medium") 106 | #endif 107 | } 108 | 109 | func testSystemRegularOfTextStyle() { 110 | #if(iOS) 111 | XCTAssertEqual(SystemFont.italic.of(textStyle: .largeTitle).fontName, ".SFUIDisplay-Italic") 112 | #elseif (tvOS) 113 | XCTAssertEqual(SystemFont.italic.of(textStyle: .title1).fontName, ".SFUIDisplay-Italic") 114 | #endif 115 | } 116 | 117 | func testSystemItalicOfTextStyleMax() { 118 | #if(iOS) 119 | let font = SystemFont.italic.of(textStyle: .largeTitle, maxSize: 12) 120 | XCTAssertEqual(font.pointSize, 12) 121 | XCTAssertEqual(font.fontName, ".SFUI-Italic") 122 | #elseif (tvOS) 123 | let font = SystemFont.italic.of(textStyle: .title1, maxSize: 12) 124 | XCTAssertEqual(font.pointSize, 12) 125 | XCTAssertEqual(font.fontName, ".SFUI-Italic") 126 | #endif 127 | } 128 | 129 | } 130 | 131 | -------------------------------------------------------------------------------- /Tests/TestFonts.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Fonts.swift 3 | // Swash 4 | // 5 | // Created by Sam Francis on 2/6/18. 6 | // Copyright © 2018 Mindgrub. All rights reserved. 7 | // 8 | 9 | import Swash 10 | 11 | enum Avenir: String, Font { 12 | case book = "Avenir-Book" 13 | case heavy = "Avenir-Heavy" 14 | case blackOblique = "Avenir-BlackOblique" 15 | case black = "Avenir-Black" 16 | case lightOblique = "Avenir-LightOblique" 17 | case bookOblique = "Avenir-BookOblique" 18 | case light = "Avenir-Light" 19 | case medium = "Avenir-Medium" 20 | case heavyOblique = "Avenir-HeavyOblique" 21 | case oblique = "Avenir-Oblique" 22 | case roman = "Avenir-Roman" 23 | case mediumOblique = "Avenir-MediumOblique" 24 | } 25 | 26 | enum Futura: String, Font { 27 | case bold = "Futura-Bold" 28 | case mediumItalic = "Futura-MediumItalic" 29 | case condensedExtraBold = "Futura-CondensedExtraBold" 30 | case condensedMedium = "Futura-CondensedMedium" 31 | case medium = "Futura-Medium" 32 | } 33 | 34 | enum InvalidFont: String, Font { 35 | case doesNotExist = "😈" 36 | } 37 | --------------------------------------------------------------------------------