diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-06-09 13:46:34 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-06-10 10:14:37 -0700 |
commit | fc97d70b8ea090f74a48f57d71c80b6bb51f678e (patch) | |
tree | 85cf4ac80d2a7288d8ca4dfea69a76b23eb8d44e /scripts/lib/fontbuild | |
parent | 01399c7f2f5ca881e2ed6df9c83e44145d9ea6ff (diff) |
Correct family and style data in name table.
This uncomments some code which distinguishes between Regular/Bold and other
weights when setting the UFOs' styleMapFamilyName attribute, which is used by
the FDK to set the output OTFs' family names (this association is documented
here: http://unifiedfontobject.org/versions/ufo2/fontinfo.html). It's not clear
why this code was commented out in the first place.
Part of #37
Diffstat (limited to 'scripts/lib/fontbuild')
-rw-r--r-- | scripts/lib/fontbuild/instanceNames.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/lib/fontbuild/instanceNames.py b/scripts/lib/fontbuild/instanceNames.py index eab3024..743d390 100644 --- a/scripts/lib/fontbuild/instanceNames.py +++ b/scripts/lib/fontbuild/instanceNames.py @@ -44,11 +44,10 @@ class InstanceNames: self.fullname = "%s %s" %(self.longfamily, self.longstyle) self.postscript = re.sub(' ','', self.longfamily) + "-" + re.sub(' ','',self.longstyle) - # if self.subfamilyAbbrev != "" and self.subfamilyAbbrev != None and self.subfamilyAbbrev != "Rg": - # self.shortfamily = "%s %s" %(self.longfamily, self.subfamilyAbbrev) - # else: - # self.shortfamily = self.longfamily - self.shortfamily = self.longfamily + if self.subfamilyAbbrev != "" and self.subfamilyAbbrev != None and self.subfamilyAbbrev != "Rg": + self.shortfamily = "%s %s" %(self.longfamily, self.longstyle.split()[0]) + else: + self.shortfamily = self.longfamily def setRFNames(self,f, version=1, versionMinor=0): f.info.familyName = self.longfamily |