-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[makeotf] Fail if UFO has no 'postscriptFontName' value
Makes it behave the same as when a Type 1 font with no '/FontName' is used as input Fixes #282
- Loading branch information
1 parent
25169f7
commit 603c385
Showing
10 changed files
with
378 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
164 changes: 164 additions & 0 deletions
164
Tests/makeotf_data/input/ufo2-noPSname.ufo/fontinfo.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<?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"> | ||
<dict> | ||
<key>ascender</key> | ||
<integer>712</integer> | ||
<key>capHeight</key> | ||
<integer>656</integer> | ||
<key>copyright</key> | ||
<string>Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'.</string> | ||
<key>descender</key> | ||
<integer>-205</integer> | ||
<key>familyName</key> | ||
<string>Source Sans Pro</string> | ||
<key>italicAngle</key> | ||
<integer>0</integer> | ||
<key>openTypeHheaAscender</key> | ||
<integer>984</integer> | ||
<key>openTypeHheaDescender</key> | ||
<integer>-273</integer> | ||
<key>openTypeHheaLineGap</key> | ||
<integer>0</integer> | ||
<key>openTypeNameDesigner</key> | ||
<string>Paul D. Hunt</string> | ||
<key>openTypeNameLicense</key> | ||
<string>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL. This Font Software is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissions and limitations governing your use of this Font Software.</string> | ||
<key>openTypeNameLicenseURL</key> | ||
<string>http://scripts.sil.org/OFL</string> | ||
<key>openTypeNameManufacturer</key> | ||
<string>Adobe Systems Incorporated</string> | ||
<key>openTypeNameManufacturerURL</key> | ||
<string>http://www.adobe.com/type</string> | ||
<key>openTypeOS2CodePageRanges</key> | ||
<array> | ||
<integer>0</integer> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
<integer>3</integer> | ||
<integer>4</integer> | ||
<integer>7</integer> | ||
<integer>8</integer> | ||
<integer>29</integer> | ||
</array> | ||
<key>openTypeOS2Panose</key> | ||
<array> | ||
<integer>2</integer> | ||
<integer>11</integer> | ||
<integer>5</integer> | ||
<integer>3</integer> | ||
<integer>3</integer> | ||
<integer>4</integer> | ||
<integer>3</integer> | ||
<integer>2</integer> | ||
<integer>2</integer> | ||
<integer>4</integer> | ||
</array> | ||
<key>openTypeOS2Type</key> | ||
<array> | ||
</array> | ||
<key>openTypeOS2TypoAscender</key> | ||
<integer>750</integer> | ||
<key>openTypeOS2TypoDescender</key> | ||
<integer>-250</integer> | ||
<key>openTypeOS2TypoLineGap</key> | ||
<integer>0</integer> | ||
<key>openTypeOS2UnicodeRanges</key> | ||
<array> | ||
<integer>0</integer> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
<integer>4</integer> | ||
<integer>5</integer> | ||
<integer>6</integer> | ||
<integer>7</integer> | ||
<integer>9</integer> | ||
<integer>29</integer> | ||
<integer>30</integer> | ||
<integer>32</integer> | ||
<integer>57</integer> | ||
</array> | ||
<key>openTypeOS2VendorID</key> | ||
<string>ADBO</string> | ||
<key>openTypeOS2WinAscent</key> | ||
<integer>984</integer> | ||
<key>openTypeOS2WinDescent</key> | ||
<integer>273</integer> | ||
<key>postscriptBlueFuzz</key> | ||
<integer>0</integer> | ||
<key>postscriptBlueScale</key> | ||
<real>0.0625</real> | ||
<key>postscriptBlueValues</key> | ||
<array> | ||
<integer>-12</integer> | ||
<integer>0</integer> | ||
<integer>486</integer> | ||
<integer>498</integer> | ||
<integer>518</integer> | ||
<integer>530</integer> | ||
<integer>574</integer> | ||
<integer>586</integer> | ||
<integer>638</integer> | ||
<integer>650</integer> | ||
<integer>656</integer> | ||
<integer>668</integer> | ||
<integer>712</integer> | ||
<integer>724</integer> | ||
</array> | ||
<key>postscriptFamilyBlues</key> | ||
<array> | ||
<integer>-12</integer> | ||
<integer>0</integer> | ||
<integer>486</integer> | ||
<integer>498</integer> | ||
<integer>518</integer> | ||
<integer>530</integer> | ||
<integer>574</integer> | ||
<integer>586</integer> | ||
<integer>638</integer> | ||
<integer>650</integer> | ||
<integer>656</integer> | ||
<integer>668</integer> | ||
<integer>712</integer> | ||
<integer>724</integer> | ||
</array> | ||
<key>postscriptFamilyOtherBlues</key> | ||
<array> | ||
<integer>-217</integer> | ||
<integer>-205</integer> | ||
</array> | ||
<key>postscriptForceBold</key> | ||
<false/> | ||
<key>postscriptOtherBlues</key> | ||
<array> | ||
<integer>-217</integer> | ||
<integer>-205</integer> | ||
</array> | ||
<key>postscriptStemSnapH</key> | ||
<array> | ||
<integer>67</integer> | ||
<integer>78</integer> | ||
</array> | ||
<key>postscriptStemSnapV</key> | ||
<array> | ||
<integer>84</integer> | ||
<integer>95</integer> | ||
</array> | ||
<key>postscriptUnderlinePosition</key> | ||
<integer>-75</integer> | ||
<key>postscriptUnderlineThickness</key> | ||
<integer>50</integer> | ||
<key>styleName</key> | ||
<string>Regular</string> | ||
<key>trademark</key> | ||
<string>Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.</string> | ||
<key>unitsPerEm</key> | ||
<integer>1000</integer> | ||
<key>versionMajor</key> | ||
<integer>2</integer> | ||
<key>versionMinor</key> | ||
<integer>20</integer> | ||
<key>xHeight</key> | ||
<integer>486</integer> | ||
</dict> | ||
</plist> |
38 changes: 38 additions & 0 deletions
38
Tests/makeotf_data/input/ufo2-noPSname.ufo/glyphs/_notdef.glif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<glyph name=".notdef" format="1"> | ||
<advance width="653"/> | ||
<outline> | ||
<contour> | ||
<point x="89" y="0" type="line"/> | ||
<point x="565" y="0" type="line"/> | ||
<point x="565" y="660" type="line"/> | ||
<point x="89" y="660" type="line"/> | ||
</contour> | ||
<contour> | ||
<point x="197" y="58" type="line"/> | ||
<point x="271" y="190" type="line"/> | ||
<point x="325" y="293" type="line"/> | ||
<point x="329" y="293" type="line"/> | ||
<point x="381" y="190" type="line"/> | ||
<point x="454" y="58" type="line"/> | ||
</contour> | ||
<contour> | ||
<point x="325" y="387" type="line"/> | ||
<point x="275" y="481" type="line"/> | ||
<point x="209" y="600" type="line"/> | ||
<point x="444" y="600" type="line"/> | ||
<point x="378" y="481" type="line"/> | ||
<point x="329" y="387" type="line"/> | ||
</contour> | ||
<contour> | ||
<point x="154" y="110" type="line"/> | ||
<point x="154" y="572" type="line"/> | ||
<point x="281" y="340" type="line"/> | ||
</contour> | ||
<contour> | ||
<point x="498" y="110" type="line"/> | ||
<point x="372" y="340" type="line"/> | ||
<point x="498" y="572" type="line"/> | ||
</contour> | ||
</outline> | ||
</glyph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<glyph name="a" format="1"> | ||
<unicode hex="0061"/> | ||
<advance width="504"/> | ||
<outline> | ||
<contour> | ||
<point x="194" y="-12" type="curve" smooth="yes"/> | ||
<point x="255" y="-12"/> | ||
<point x="309" y="20"/> | ||
<point x="355" y="58" type="curve"/> | ||
<point x="358" y="58" type="line"/> | ||
<point x="365" y="0" type="line"/> | ||
<point x="433" y="0" type="line"/> | ||
<point x="433" y="298" type="line" smooth="yes"/> | ||
<point x="433" y="419"/> | ||
<point x="383" y="498"/> | ||
<point x="264" y="498" type="curve" smooth="yes"/> | ||
<point x="186" y="498"/> | ||
<point x="118" y="464"/> | ||
<point x="73" y="435" type="curve"/> | ||
<point x="105" y="378" type="line"/> | ||
<point x="143" y="404"/> | ||
<point x="194" y="430"/> | ||
<point x="250" y="430" type="curve" smooth="yes"/> | ||
<point x="330" y="430"/> | ||
<point x="350" y="370"/> | ||
<point x="350" y="308" type="curve"/> | ||
<point x="143" y="285"/> | ||
<point x="52" y="232"/> | ||
<point x="52" y="126" type="curve" smooth="yes"/> | ||
<point x="52" y="39"/> | ||
<point x="113" y="-12"/> | ||
</contour> | ||
<contour> | ||
<point x="218" y="54" type="curve" smooth="yes"/> | ||
<point x="170" y="54"/> | ||
<point x="132" y="77"/> | ||
<point x="132" y="132" type="curve" smooth="yes"/> | ||
<point x="132" y="194"/> | ||
<point x="188" y="234"/> | ||
<point x="350" y="254" type="curve"/> | ||
<point x="350" y="119" type="line"/> | ||
<point x="303" y="77"/> | ||
<point x="265" y="54"/> | ||
</contour> | ||
<contour> | ||
<point name="ogonekLC" x="414" y="0" type="move"/> | ||
</contour> | ||
<contour> | ||
<point name="aboveLC" x="269" y="509" type="move"/> | ||
</contour> | ||
<contour> | ||
<point name="belowLC" x="252" y="-22" type="move"/> | ||
</contour> | ||
</outline> | ||
</glyph> |
10 changes: 10 additions & 0 deletions
10
Tests/makeotf_data/input/ufo2-noPSname.ufo/glyphs/contents.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?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"> | ||
<dict> | ||
<key>.notdef</key> | ||
<string>_notdef.glif</string> | ||
<key>a</key> | ||
<string>a.glif</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?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"> | ||
<dict> | ||
<key>public.glyphOrder</key> | ||
<array> | ||
<string>.notdef</string> | ||
<string>a</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?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"> | ||
<dict> | ||
<key>creator</key> | ||
<string>org.robofab.ufoLib</string> | ||
<key>formatVersion</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.