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

Fonts: deprecate fontName for name property #27

Merged
merged 3 commits into from
Apr 22, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ _None_
* More variables have been deprecated, while new variables have been added.
[David Jennes](https:/djbe)
[#13](https:/SwiftGen/SwiftGenKit/issues/13)
[#27](https:/SwiftGen/SwiftGenKit/issues/27)
* The `strings`, `structuredStrings` and `tableName` have been replaced by `tables`, which is an array of string tables, each with a `name` and a `strings` property.
* For each string, the `params` variable and it's subvariables (such as `names`, `count`, ...) have been replaced by `types`, which is an array of types.
* `enumName`, `sceneEnumName` and `segueEnumName` have been replaced by `param.enumName`, `param.sceneEnumName` and `param.segueEnumName` respectively. Templates should provide a default value for these in case the variables are empty.
Expand Down
3 changes: 3 additions & 0 deletions Sources/Stencil/FontsContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ extension FontsFileParser {
// Font
return [
"style": font.style,
"name": font.postScriptName,

// NOTE: This is a deprecated variable
"fontName": font.postScriptName
]
}.sorted { $0["fontName"] ?? "" < $1["fontName"] ?? "" }
Expand Down