Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for fonts with multiple descriptors #156

Merged
merged 3 commits into from
Aug 17, 2016

Conversation

chrisellsworth
Copy link
Collaborator

I ran into an issue where I tried to use the font "Avenir" which contains descriptors for "Light", "Medium", "Heavy", etc., and the output from swiftgen only contained the descriptor for "Book."

The intent of this change is to support all of the descriptors from a given font, rather than just the first.

@AliSoftware
Copy link
Collaborator

Perfect, nice one 👌

Could you just please add an entry in the CHANGELOG.md to mention that change and credit yourself? Thanks!

@chrisellsworth
Copy link
Collaborator Author

Done. Thanks! Looks like there's now a conflict though. Do you prefer that I rebase my feature branch or make a merge commit, or will you make the merge on your side when pulling in the PR?

@AliSoftware
Copy link
Collaborator

If you can rebase your PR on top of master that would be great, thanks!

@AliSoftware
Copy link
Collaborator

AliSoftware commented Aug 17, 2016

Mmmmh idk what happened with Travis, it seems your rebase didn't properly trigger a new build like it should've. Maybe pushing a dummy new commit might help re-triggering the travis hook?!

@@ -35,16 +35,18 @@ public func == (lhs: Font, rhs: Font) -> Bool {
// MARK: CTFont

extension CTFont {
static func parseFontInfo(fileURL: NSURL) -> Font? {
static func parseFontInfo(fileURL: NSURL) -> [Font]? {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this method returns an array and not a single font, maybe we could return a non-optional array instead (and return an empty array on any guard failure)?

@chrisellsworth
Copy link
Collaborator Author

Less code, I like it! And so does Travis 👍

@AliSoftware AliSoftware merged commit b53c571 into SwiftGen:master Aug 17, 2016
@AliSoftware
Copy link
Collaborator

🎉

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants