-
Notifications
You must be signed in to change notification settings - Fork 38
Conversation
Note that the branch name has "breaking" in it, but the refactored code turns out to be compatible, so yay! 🎉 |
734244a
to
45d7aba
Compare
I may see one use case where you would want to iterate over the fonts:
I've done this by adding a |
Documentation/fonts/swift2.md
Outdated
@@ -27,10 +27,10 @@ You can customize some elements of this template by overriding the following par | |||
```swift | |||
enum FontFamily { | |||
enum SFNSDisplay: String, FontConvertible { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The String, FontConvertible
conformance has been removed in your stencils.
I've made a gist with a enum version with your fixes and the |
Hmm, my original point still stands, there's no reason to enumerate over the fonts, because you can't convert a string to the correct font (using That doesn't mean we can't add a |
Ok that's fine by me. We just need to remove the |
@Liquidsoul does my last commit fix your questions? If so could you approve the PR so we can merge? Thx 😉 |
97777a7
to
ff2eddf
Compare
@AliSoftware LGTM 👍 |
Refactored the generated code to use
static let
constants instead of cases, as there is no real use case to want to enumerate over a font name.There were also some issues with the font registration mechanism, which was broken if:
The fonts were also always re-registered if the font name was different from the font family name. We now directly use the path we receive from the parser, and match using the font family name from the parser.