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

Font relative paths #71

Merged
merged 7 commits into from
Aug 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ _None_
* XCAssets: Added support for named colors.
[David Jennes](https://github.com/djbe)
[#68](https://github.com/SwiftGen/templates/pull/68)
* Fonts: the path to fonts will now default to just the font filename, but you can disable this behaviour by enabling the `preservePath` parameter.
[David Jennes](https://github.com/djbe)
[#71](https://github.com/SwiftGen/templates/pull/71)

### Internal Changes

Expand Down
42 changes: 21 additions & 21 deletions Contexts/Fonts/defaults.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@
<key>name</key>
<string>.SFNSDisplay-Black</string>
<key>path</key>
<string>SFNSDisplay-Black.otf</string>
<string>Fonts/SFNSDisplay-Black.otf</string>
<key>style</key>
<string>Black</string>
</dict>
<dict>
<key>name</key>
<string>.SFNSDisplay-Bold</string>
<key>path</key>
<string>SFNSDisplay-Bold.otf</string>
<string>Fonts/SFNSDisplay-Bold.otf</string>
<key>style</key>
<string>Bold</string>
</dict>
<dict>
<key>name</key>
<string>.SFNSDisplay-Heavy</string>
<key>path</key>
<string>SFNSDisplay-Heavy.otf</string>
<string>Fonts/SFNSDisplay-Heavy.otf</string>
<key>style</key>
<string>Heavy</string>
</dict>
<dict>
<key>name</key>
<string>.SFNSDisplay-Regular</string>
<key>path</key>
<string>SFNSDisplay-Regular.otf</string>
<string>Fonts/SFNSDisplay-Regular.otf</string>
<key>style</key>
<string>Regular</string>
</dict>
Expand All @@ -50,23 +50,23 @@
<key>name</key>
<string>.SFNSText-Bold</string>
<key>path</key>
<string>SFNSText-Bold.otf</string>
<string>Fonts/SFNSText-Bold.otf</string>
<key>style</key>
<string>Bold</string>
</dict>
<dict>
<key>name</key>
<string>.SFNSText-Heavy</string>
<key>path</key>
<string>SFNSText-Heavy.otf</string>
<string>Fonts/SFNSText-Heavy.otf</string>
<key>style</key>
<string>Heavy</string>
</dict>
<dict>
<key>name</key>
<string>.SFNSText-Regular</string>
<key>path</key>
<string>SFNSText-Regular.otf</string>
<string>Fonts/SFNSText-Regular.otf</string>
<key>style</key>
<string>Regular</string>
</dict>
Expand All @@ -81,95 +81,95 @@
<key>name</key>
<string>Avenir-Black</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Black</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-BlackOblique</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Black Oblique</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-Book</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Book</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-BookOblique</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Book Oblique</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-Heavy</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Heavy</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-HeavyOblique</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Heavy Oblique</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-Light</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Light</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-LightOblique</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Light Oblique</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-Medium</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Medium</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-MediumOblique</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Medium Oblique</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-Oblique</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Oblique</string>
</dict>
<dict>
<key>name</key>
<string>Avenir-Roman</string>
<key>path</key>
<string>Avenir.ttc</string>
<string>Fonts/Avenir.ttc</string>
<key>style</key>
<string>Roman</string>
</dict>
Expand All @@ -184,7 +184,7 @@
<key>name</key>
<string>ZapfDingbatsITC</string>
<key>path</key>
<string>ZapfDingbats.ttf</string>
<string>Fonts/ZapfDingbats.ttf</string>
<key>style</key>
<string>Regular</string>
</dict>
Expand All @@ -199,7 +199,7 @@
<key>name</key>
<string>private</string>
<key>path</key>
<string>class.ttf</string>
<string>Fonts/class.ttf</string>
<key>style</key>
<string>internal</string>
</dict>
Expand Down
1 change: 1 addition & 0 deletions Documentation/fonts/swift2.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ You can customize some elements of this template by overriding the following par
| Parameter Name | Default Value | Description |
| -------------- | ------------- | ----------- |
| `enumName` | `FontFamily` | Allows you to change the name of the generated `enum` containing all font families. |
| `preservePath` | N/A | Setting this parameter will disable the basename filter applied to all font paths. Use this if you added your font folder as a "folder reference" in your Xcode project, making that folder hierarchy preserved once copied in the build app bundle. The path will be relative to the folder you provided to SwiftGen. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

👌


## Generated Code

Expand Down
1 change: 1 addition & 0 deletions Documentation/fonts/swift3.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ You can customize some elements of this template by overriding the following par
| Parameter Name | Default Value | Description |
| -------------- | ------------- | ----------- |
| `enumName` | `FontFamily` | Allows you to change the name of the generated `enum` containing all font families. |
| `preservePath` | N/A | Setting this parameter will disable the basename filter applied to all font paths. Use this if you added your font folder as a "folder reference" in your Xcode project, making that folder hierarchy preserved once copied in the build app bundle. The path will be relative to the folder you provided to SwiftGen. |

## Generated Code

Expand Down
1 change: 1 addition & 0 deletions Documentation/fonts/swift4.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ You can customize some elements of this template by overriding the following par
| Parameter Name | Default Value | Description |
| -------------- | ------------- | ----------- |
| `enumName` | `FontFamily` | Allows you to change the name of the generated `enum` containing all font families. |
| `preservePath` | N/A | Setting this parameter will disable the basename filter applied to all font paths. Use this if you added your font folder as a "folder reference" in your Xcode project, making that folder hierarchy preserved once copied in the build app bundle. The path will be relative to the folder you provided to SwiftGen. |

## Generated Code

Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EXTERNAL SOURCES:

CHECKOUT OPTIONS:
StencilSwiftKit:
:commit: 695b6bfd3f0f54cec5b96d65783f98c3edd9a81c
:commit: 3ba083dea79a953156a3f128dcad0452f62a8132
:git: https://github.com/SwiftGen/StencilSwiftKit

SPEC CHECKSUMS:
Expand Down
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Pods/StencilSwiftKit/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Pods/StencilSwiftKit/Sources/Environment.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading