From fc97d70b8ea090f74a48f57d71c80b6bb51f678e Mon Sep 17 00:00:00 2001 From: James Godfrey-Kittle Date: Tue, 9 Jun 2015 13:46:34 -0700 Subject: 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 --- scripts/lib/fontbuild/instanceNames.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts/lib/fontbuild') 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 -- cgit v1.2.3