Skip to content

Commit eed3c21

Browse files
committed
Update font for Glitch effect.
1 parent 84fc49d commit eed3c21

File tree

7 files changed

+13
-17
lines changed

7 files changed

+13
-17
lines changed

ArtOfAscii.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
5EBEC2F0205B399300975D3F /* LiveViewHost.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5EBEC2EF205B396500975D3F /* LiveViewHost.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1818
5EF2F97C2054B6E400191409 /* ManifestPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5EF2F97E2054B6E400191409 /* ManifestPlist.strings */; };
1919
5EF2F9B72054E6FB00191409 /* Chapters in Copy Book Contents */ = {isa = PBXBuildFile; fileRef = 5EF2F9B62054E6F900191409 /* Chapters */; };
20+
712C83412407DF15005F805E /* unscii-16.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 712C83402407DF15005F805E /* unscii-16.ttf */; };
2021
712D0B962401502B00B41EF9 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 712D0B952401502A00B41EF9 /* logo.png */; };
2122
712D0B982401599400B41EF9 /* cover.png in Resources */ = {isa = PBXBuildFile; fileRef = 712D0B972401599400B41EF9 /* cover.png */; };
2223
7150CFD924064A3600C5480F /* CloudyEffectProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7150CFD824064A3600C5480F /* CloudyEffectProcessor.swift */; };
@@ -45,7 +46,6 @@
4546
71AA4FCF24069A5500062C2C /* cloudy-thumb.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 71AA4FCA24069A5500062C2C /* cloudy-thumb.jpg */; };
4647
71AA4FD024069A5500062C2C /* glitch-thumb.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 71AA4FCB24069A5500062C2C /* glitch-thumb.jpg */; };
4748
71BA4ED823FE31BA00788A11 /* FiraCode-VF.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 71BA4ED723FE31BA00788A11 /* FiraCode-VF.ttf */; };
48-
71DC6AF6240648C900B024CF /* joystix monospace.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 71DC6AF5240648C900B024CF /* joystix monospace.ttf */; };
4949
71DC6AF9240648D000B024CF /* Courier Prime.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 71DC6AF7240648D000B024CF /* Courier Prime.ttf */; };
5050
71DC6AFA240648D000B024CF /* Courier Prime Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 71DC6AF8240648D000B024CF /* Courier Prime Bold.ttf */; };
5151
71E066A42404F306009EEA75 /* GlitchEffectProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71E066A32404F306009EEA75 /* GlitchEffectProcessor.swift */; };
@@ -188,6 +188,7 @@
188188
5EF2F97D2054B6E400191409 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/ManifestPlist.strings; sourceTree = "<group>"; };
189189
5EF2F9AB2054BBF300191409 /* libBookCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBookCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
190190
5EF2F9B62054E6F900191409 /* Chapters */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Chapters; sourceTree = "<group>"; };
191+
712C83402407DF15005F805E /* unscii-16.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "unscii-16.ttf"; sourceTree = "<group>"; };
191192
712D0B952401502A00B41EF9 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
192193
712D0B972401599400B41EF9 /* cover.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cover.png; sourceTree = "<group>"; };
193194
7150CFD824064A3600C5480F /* CloudyEffectProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CloudyEffectProcessor.swift; sourceTree = "<group>"; };
@@ -214,7 +215,6 @@
214215
71AA4FCA24069A5500062C2C /* cloudy-thumb.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "cloudy-thumb.jpg"; sourceTree = "<group>"; };
215216
71AA4FCB24069A5500062C2C /* glitch-thumb.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "glitch-thumb.jpg"; sourceTree = "<group>"; };
216217
71BA4ED723FE31BA00788A11 /* FiraCode-VF.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "FiraCode-VF.ttf"; sourceTree = "<group>"; };
217-
71DC6AF5240648C900B024CF /* joystix monospace.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "joystix monospace.ttf"; sourceTree = "<group>"; };
218218
71DC6AF7240648D000B024CF /* Courier Prime.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Courier Prime.ttf"; sourceTree = "<group>"; };
219219
71DC6AF8240648D000B024CF /* Courier Prime Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Courier Prime Bold.ttf"; sourceTree = "<group>"; };
220220
71E066A32404F306009EEA75 /* GlitchEffectProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlitchEffectProcessor.swift; sourceTree = "<group>"; };
@@ -440,9 +440,9 @@
440440
71BA4ED223FE2E0200788A11 /* PublicResources */ = {
441441
isa = PBXGroup;
442442
children = (
443+
712C83402407DF15005F805E /* unscii-16.ttf */,
443444
71DC6AF7240648D000B024CF /* Courier Prime.ttf */,
444445
71DC6AF8240648D000B024CF /* Courier Prime Bold.ttf */,
445-
71DC6AF5240648C900B024CF /* joystix monospace.ttf */,
446446
71BA4ED723FE31BA00788A11 /* FiraCode-VF.ttf */,
447447
);
448448
path = PublicResources;
@@ -788,6 +788,7 @@
788788
isa = PBXResourcesBuildPhase;
789789
buildActionMask = 2147483647;
790790
files = (
791+
712C83412407DF15005F805E /* unscii-16.ttf in Resources */,
791792
7174D3B823F7D0D100A09FFB /* cat.jpg in Resources */,
792793
71BA4ED823FE31BA00788A11 /* FiraCode-VF.ttf in Resources */,
793794
5EF2F97C2054B6E400191409 /* ManifestPlist.strings in Resources */,
@@ -802,7 +803,6 @@
802803
712D0B982401599400B41EF9 /* cover.png in Resources */,
803804
5E551EC52371FC3F00784365 /* Assets.xcassets in Resources */,
804805
7174D3BA23F7D0D100A09FFB /* strawberries.jpg in Resources */,
805-
71DC6AF6240648C900B024CF /* joystix monospace.ttf in Resources */,
806806
7174D3B923F7D0D100A09FFB /* desert-thumb.jpg in Resources */,
807807
716164FB24017FCF0096D141 /* background-v2.png in Resources */,
808808
71DC6AFA240648D000B024CF /* Courier Prime Bold.ttf in Resources */,

ArtOfAscii/Chapters/02-Acknowledgements.playgroundchapter/Pages/01-Acknwoledgements.playgroundpage/main.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ This license is copied below, and is also available with a FAQ at:
8484
http://scripts.sil.org/OFL
8585

8686

87-
-----------------------------------------------------------
8887
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
89-
-----------------------------------------------------------
9088

9189
PREAMBLE
9290
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
@@ -132,9 +130,7 @@ with Reserved Font Name Courier Prime.
132130
This Font Software is licensed under the SIL Open Font License, Version 1.1.
133131
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
134132

135-
—————————————————————————————-
136133
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
137-
—————————————————————————————-
138134

139135
PREAMBLE
140136
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.

ArtOfAscii/Modules/BookCore.playgroundmodule/Sources/Core/FontResourceProvider.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ public class FontResourceProvider {
7070

7171
}
7272

73-
public enum JoystixMonospace: String, Font {
74-
75-
case regular = "JoystixMonospace-Regular"
73+
public enum Unscii16: String, Font {
7674

7775
public static var resourceNames: [FontResourceName] {
78-
return [FontResourceName(name: "joystix monospace", extensionName: "ttf")]
76+
return [FontResourceName(name: "unscii-16", extensionName: "ttf")s]
7977
}
8078

79+
case regular = "unscii-16"
80+
8181
public static var characterAspectRatio: Double {
82-
return 0.82
82+
return 0.5
8383
}
8484

8585
}

ArtOfAscii/Modules/BookCore.playgroundmodule/Sources/UserInterface/Chapters/01-ArtOfAscii/01-Introduction/AsciiEffectsProcessor/Effects/GlitchEffectProcessor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class GlitchEffectProcessor: AsciiEffectsProcessor {
1313

1414
var charactersPerRow = 80
1515

16-
var characterAspectRatio = CGFloat(FontResourceProvider.JoystixMonospace.characterAspectRatio)
16+
var characterAspectRatio = CGFloat(FontResourceProvider.Unscii16.characterAspectRatio)
1717

1818
var fontSize: CGFloat = 14.0
1919

2020
var font: UIFont {
21-
return UIFont(name: FontResourceProvider.JoystixMonospace.regular.rawValue, size: fontSize)!
21+
return UIFont(name: FontResourceProvider.Unscii16.regular.rawValue, size: fontSize)!
2222
}
2323

2424
var lineHeight: CGFloat {
@@ -107,7 +107,7 @@ class GlitchEffectProcessor: AsciiEffectsProcessor {
107107
NSAttributedString.Key.foregroundColor: UIColor.effectCyan
108108
])
109109

110-
let glitchLevels = [-1.75, -1.5, -1.25, -1, 0, 1, 1.25, 1.5, 1.75]
110+
let glitchLevels = [-1.75, -1.5, -1.25, -1, 1, 1.25, 1.5, 1.75]
111111

112112
let glitchX = CGFloat(glitchLevels.randomElement()!)
113113
let glitchY = CGFloat(glitchLevels.randomElement()!)

ArtOfAscii/Modules/BookCore.playgroundmodule/Sources/UserInterface/Chapters/01-ArtOfAscii/01-Introduction/IntroductionLiveViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public class IntroductionLiveViewController: BaseViewController, PhotoAlbumSavab
158158
private func registerFonts() {
159159
FontResourceProvider.FiraCode.register()
160160
FontResourceProvider.CourierPrime.register()
161-
FontResourceProvider.JoystixMonospace.register()
161+
FontResourceProvider.Unscii16.register()
162162
}
163163

164164
}
-46.5 KB
Binary file not shown.
184 KB
Binary file not shown.

0 commit comments

Comments
 (0)