Skip to content

Commit

Permalink
Version 1.5.2 update
Browse files Browse the repository at this point in the history
Fixer.fixName(): Win->Mac must take place first because Win has more
than one sections: winBMP, winSym and winFul.
  • Loading branch information
Pal3love committed Sep 9, 2017
1 parent 89f1350 commit 0a1ddf9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
17 changes: 9 additions & 8 deletions Package/otRebuilder/Lib/Fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ def fixName(self):
unsupported.append(namRec)
else:
unsupported.append(namRec)
# The following order must be Win->Mac then Mac->Win!
# Convert Win names into Mac
for namRec in winNamRecs:
if namRec.nameID in [16, 17]:
continue # Macintosh platform doesn't need preferred family/subfamily.
tmpMacRec = Workers.NameWorker.winName2Mac(namRec)
if tmpMacRec is None:
continue
builder.addMacNameEx(tmpMacRec.string, tmpMacRec.nameID, tmpMacRec.langID)
# Convert Mac names into Win
for namRec in macNamRecs:
if namRec.nameID == 18:
Expand All @@ -177,14 +186,6 @@ def fixName(self):
continue
for tmpWinRec in tmpWinRecs:
builder.addWinNameEx(tmpWinRec.string, tmpWinRec.nameID, tmpWinRec.langID)
# Convert Win names into Mac
for namRec in winNamRecs:
if namRec.nameID in [16, 17]:
continue # Macintosh platform doesn't need preferred family/subfamily.
tmpMacRec = Workers.NameWorker.winName2Mac(namRec)
if tmpMacRec is None:
continue
builder.addMacNameEx(tmpMacRec.string, tmpMacRec.nameID, tmpMacRec.langID)
# Update the `name` table with `cmap` consistency
name = builder.build(cmap)
name.names.extend(unsupported)
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.1, powered by fontTools
descriptionStr = """ OpenType Font Rebuilder: Version 1.5.2, 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
3 changes: 2 additions & 1 deletion Package/otrebuilder.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Metadata-Version: 1.1
Name: otrebuilder
Version: 1.5.1
Version: 1.5.2
Summary: A simple tool to resolve OpenType fonts' mapping and naming issues, powered by fontTools.
Home-page: https://github.com/Pal3love/otRebuilder
Author: Pal3love
Author-email: pal3love@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Description: UNKNOWN
Platform: Any
Classifier: Environment :: Console
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.1",
version = "1.5.2",
description = "A simple tool to resolve OpenType fonts' mapping and naming issues, powered by fontTools.",
author = "Pal3love",
author_email = "pal3love@gmail.com",
Expand Down

0 comments on commit 0a1ddf9

Please sign in to comment.