Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
fix: broken generation
Browse files Browse the repository at this point in the history
  • Loading branch information
maximkrouk committed May 7, 2021
1 parent 581fab9 commit 66cbe79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ Install `spmgen` CLI

### Installation

#### Homebrew

```bash
brew install edudo-inc/formulae/spmgen
```
> Homebrew support will be added soon
#### Makefile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,17 @@ func renderStaticFactoryForFontResource() -> String {
NSFontManager.shared.availableFontFamilies.map { family in
NSFontManager.shared.availableMembers(ofFontFamily: family).map { memebers in
(family, memebers.compactMap { $0.first as? String })
}.or((family, [String]()))
} ?? (family, [String]())
}
}
public static func installedFontset() -> Set<String> {
Set(
(CTFontManagerCopyAvailableFontFamilyNames() as Array).flatMap { family -> [String] in
if let family = family as? String {
return NSFontManager.shared.availableMembers(ofFontFamily: family)
.map { $0.compactMap { $0.first as? String } }
.or([String]())
?? [String]()
} else {
return [String]()
}
Expand Down

0 comments on commit 66cbe79

Please sign in to comment.