Skip to content

Commit

Permalink
Version 1.5.1 update
Browse files Browse the repository at this point in the history
From now the Mac nameID 1 no longer requires <= 31 characters.
  • Loading branch information
Pal3love committed Sep 2, 2017
1 parent 9fff4e6 commit 89f1350
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Package/otRebuilder/Lib/Builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,16 +533,17 @@ def __genPSCIDFFmacExs(self):
self.addNameEx(self.__pscidffustr, 20, 1, macPltEncID, 65535)
return

# This is rather undocumented in the spec: string length of nameID 1 must be less than 32,
# This is undocumented in OT spec: string length of Windows nameID 1 must be less than 32,
# otherwise the font will not load in Windows.
# UPDATE: Windows 10 no longer requires this.
def __truncateLimitedExs(self):
exSetArray = [self.__macExs, self.__winSymExs, self.__winBMPExs, self.__winFulExs, self.__winLgcExs, self.__miscExs]
for exSet in exSetArray:
for ex in exSet:
string = ex.getString()
if ex.getNameID() == 1 and len(string) > 31:
print("WARNING: Legacy family name is longer than 31 characters. It will be truncated.", file = sys.stderr)
print("Legacy family name: " + string, file = sys.stderr)
if ex.getPlatformID() == 3 and ex.getNameID() == 1 and len(string) > 31:
print("WARNING: Windows legacy family name is longer than 31 characters. It will be truncated.", file = sys.stderr)
print("Windows legacy family name: " + string, file = sys.stderr)
ex.setString(string[:31])
elif ex.getNameID() == 6 and len(string) > 63:
print("WARNING: PostScript name is longer than 63 bytes. It will be truncated.", file = sys.stderr)
Expand Down
2 changes: 1 addition & 1 deletion Package/otRebuilder/otrebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


usageStr = "usage: otrebuild [options] <inputFont>"
descriptionStr = """ OpenType Font Rebuilder: Version 1.5.0, powered by fontTools
descriptionStr = """ OpenType Font Rebuilder: Version 1.5.1, powered by fontTools
This is a simple tool to resolve naming, styling and mapping issues
among OpenType fonts. Without any options given, it can scan and
Expand Down
2 changes: 1 addition & 1 deletion Package/otrebuilder.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: otrebuilder
Version: 1.5.0
Version: 1.5.1
Summary: A simple tool to resolve OpenType fonts' mapping and naming issues, powered by fontTools.
Home-page: https://github.com/Pal3love/otRebuilder
Author: Pal3love
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name = "otrebuilder",
version = "1.5.0",
version = "1.5.1",
description = "A simple tool to resolve OpenType fonts' mapping and naming issues, powered by fontTools.",
author = "Pal3love",
author_email = "[email protected]",
Expand Down

0 comments on commit 89f1350

Please sign in to comment.