Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Add "path" to the fonts contexts #25

Merged
merged 8 commits into from
May 2, 2017
Merged

Add "path" to the fonts contexts #25

merged 8 commits into from
May 2, 2017

Conversation

AliSoftware
Copy link
Contributor

@AliSoftware AliSoftware commented Apr 21, 2017

So that we can later add templates to generate th Info.plist's UIAppFonts key content

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
{% for family in families %}
  <!-- {{family.name}} -->
  {% for font in family.fonts %}
  <string>{{font.path}}</string>
  {% endfor %}
{% endfor %}
</array>
</plist>

See also SwiftGen/templates#37

@AliSoftware
Copy link
Contributor Author

AliSoftware commented Apr 21, 2017

Mmmmh tests pass locally on my machine, not sure why they don't pass the CI… will have to investigate later (I didn't see I wasn't logged in at first and thus didn't see the artefacts, which was a bit puzzling… time to 💤 I guess)

@djbe
Copy link
Member

djbe commented Apr 21, 2017

Is it possible for a font to be in a subfolder? (and not just the root of the bundle) If so, is it a use case we want to cover?

Edit: never mind, too early in the morning. Just re-read the implementation and noticed that parent is the path to the directory you're scanning, so you support sub-folders 🎉

@djbe
Copy link
Member

djbe commented Apr 21, 2017

Seeing the diff on github, your templates commit (submodule) also seems to have changes for storyboards, but looking at the diff for the templates PR, that isn't the case... weird stuff 😆

@AliSoftware
Copy link
Contributor Author

Submodules joy I guess

@AliSoftware
Copy link
Contributor Author

Ah, I think #27 and #30 forgot to update the submodules on SwiftGenKit?

Because with this commit I've moved the submodule from f963082efbada6cce373aeb0b58f6905d6f24451 (HEAD) to 0171473e1be23304caa3aa884082b7b3f2d39dc3, but template's masters 2 commits after f963082efbada6cce373aeb0b58f6905d6f24451 . So when you're in SwiftGenKit's master, its submodules doesn't point to templates' master, that's where the divergence comes from I think.

@AliSoftware
Copy link
Contributor Author

capture d ecran 2017-04-21 a 16 36 18
(submodule was on "HEAD" before I pushed my changes, so the storyboards diff comes from between HEAD and Master)

@djbe
Copy link
Member

djbe commented Apr 21, 2017

Huh, weird that could happen. Will have to see if we can verify this in Danger.
Created a quick PR to address this: #26

"name": font.postScriptName,
"path": font.filePath,
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget to add this new variable to the context docs.

@djbe
Copy link
Member

djbe commented Apr 23, 2017

LGTM, I'll update #24 to match this.

@djbe
Copy link
Member

djbe commented Apr 23, 2017

Btw, don't forget (as I did) to update this PR to point to templates master after SwiftGen/templates#37 is merged.

@AliSoftware
Copy link
Contributor Author

Haha good point! 😉

@djbe djbe mentioned this pull request May 2, 2017
18 tasks
@djbe djbe merged commit 732bb79 into master May 2, 2017
@djbe djbe deleted the feature/font-path branch May 2, 2017 22:45
@djbe djbe added this to the 1.1.0 milestone May 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants