Skip to content

Support for fonts with multiple descriptors#156

Merged
AliSoftware merged 3 commits intoSwiftGen:masterfrom
chrisellsworth:multi-descriptor-fonts
Aug 17, 2016
Merged

Support for fonts with multiple descriptors#156
AliSoftware merged 3 commits intoSwiftGen:masterfrom
chrisellsworth:multi-descriptor-fonts

Conversation

@chrisellsworth
Copy link
Copy Markdown
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.

@chrisellsworth chrisellsworth force-pushed the multi-descriptor-fonts branch from 9cf9545 to 9a822c7 Compare August 12, 2016 02:48
@AliSoftware
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

@chrisellsworth chrisellsworth force-pushed the multi-descriptor-fonts branch from 248ae29 to 03c9fa7 Compare August 17, 2016 22:36
@AliSoftware
Copy link
Copy Markdown
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?!

Comment thread GenumKit/Parsers/FontsFileParser.swift Outdated

extension CTFont {
static func parseFontInfo(fileURL: NSURL) -> Font? {
static func parseFontInfo(fileURL: NSURL) -> [Font]? {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants