Hello community,

here is the log from the commit of package fonttools for openSUSE:Factory 
checked in at 2018-01-09 14:36:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fonttools (Old)
 and      /work/SRC/openSUSE:Factory/.fonttools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fonttools"

Tue Jan  9 14:36:21 2018 rev:22 rq:561492 version:3.21.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/fonttools/fonttools.changes      2017-12-09 
20:24:38.369689650 +0100
+++ /work/SRC/openSUSE:Factory/.fonttools.new/fonttools.changes 2018-01-09 
14:36:25.023003596 +0100
@@ -1,0 +2,14 @@
+Wed Jan  3 10:06:07 UTC 2018 - mplus...@suse.com
+
+- Update to version 3.21.0:
+  * [cmap] when compiling format6 subtable, don't assume gid0 is
+    always called '.notdef'
+  * [ot] Allow decompiling fonts with bad Coverage format number.
+  * Change FontTools licence to MIT.
+  * [post] Prune extra names already in standard Mac set.
+  * [subset] Delete empty SubrsIndex after subsetting.
+  * [varLib] Don't share points in cvar by default, as it currently
+    fails on some browsers.
+  * [afmLib] Make poor old afmLib work on python3.
+
+-------------------------------------------------------------------

Old:
----
  fonttools-3.20.1.tar.gz

New:
----
  fonttools-3.21.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fonttools.spec ++++++
--- /var/tmp/diff_new_pack.YtzrcG/_old  2018-01-09 14:36:25.618975641 +0100
+++ /var/tmp/diff_new_pack.YtzrcG/_new  2018-01-09 14:36:25.622975453 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package fonttools
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +17,12 @@
 
 
 Name:           fonttools
-Version:        3.20.1
+Version:        3.21.0
 Release:        0
 Summary:        Suite of Tools and Libraries for Manipulating Fonts
-License:        HPND
+License:        MIT
 Group:          Productivity/Graphics/Vector Editors
-Url:            https://github.com/fonttools/fonttools
+URL:            https://github.com/fonttools/fonttools
 Source0:        
https://github.com/fonttools/fonttools/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros

++++++ fonttools-3.20.1.tar.gz -> fonttools-3.21.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/.travis.yml 
new/fonttools-3.21.0/.travis.yml
--- old/fonttools-3.20.1/.travis.yml    2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/.travis.yml    2017-12-18 13:24:42.000000000 +0100
@@ -24,7 +24,7 @@
     - language: generic
       os: osx
       env:
-        - TOXENV=py35-cov
+        - TOXENV=py36-cov
         - HOMEBREW_NO_AUTO_UPDATE=1
     - env:
         - TOXENV=py27-nocov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/LICENSE new/fonttools-3.21.0/LICENSE
--- old/fonttools-3.20.1/LICENSE        2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/LICENSE        2017-12-18 13:24:42.000000000 +0100
@@ -1,25 +1,21 @@
-Copyright 1999-2004
-by Just van Rossum, Letterror, The Netherlands.
+MIT License
 
-                        All Rights Reserved
+Copyright (c) 2017 Just van Rossum
 
-Permission to use, copy, modify, and distribute this software and 
-its documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and 
-that both that copyright notice and this permission notice appear 
-in supporting documentation, and that the names of Just van Rossum 
-or Letterror not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
-JUST VAN ROSSUM AND LETTERROR DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL JUST VAN ROSSUM OR 
-LETTERROR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 
-
-j...@letterror.com
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/LICENSE.external 
new/fonttools-3.21.0/LICENSE.external
--- old/fonttools-3.20.1/LICENSE.external       1970-01-01 01:00:00.000000000 
+0100
+++ new/fonttools-3.21.0/LICENSE.external       2017-12-18 13:24:42.000000000 
+0100
@@ -0,0 +1,148 @@
+FontTools includes the following font projects for testing purposes, which are
+under SIL Open Font License, Version 1.1:
+
+Lobster
+  Copyright (c) 2010, Pablo Impallari (www.impallari.com|impall...@gmail.com),
+  with Reserved Font Name Lobster.
+  This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+Noto Fonts
+  This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+XITS font project
+  Copyright (c) 2001-2010 by the STI Pub Companies, consisting of the American
+  Institute of Physics, the American Chemical Society, the American
+  Mathematical Society, the American Physical Society, Elsevier, Inc., and The
+  Institute of Electrical and Electronic Engineers, Inc. (www.stixfonts.org),
+  with Reserved Font Name STIX Fonts, STIX Fonts (TM) is a  trademark of The
+  Institute of Electrical and Electronics Engineers, Inc.
+
+  Portions copyright (c) 1998-2003 by MicroPress, Inc.
+  (www.micropress-inc.com), with Reserved Font Name TM Math. To obtain
+  additional mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow
+  Street, Forest Hills, NY 11375, USA, Phone: (718) 575-1816.
+
+  Portions copyright (c) 1990 by Elsevier, Inc.
+
+  This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font
+creation efforts of academic and linguistic communities, and to
+provide a free and open framework in which fonts may be shared and
+improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply to
+any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software
+components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to,
+deleting, or substituting -- in part or in whole -- any of the
+components of the Original Version, by changing formats or by porting
+the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed,
+modify, redistribute, and sell modified and unmodified copies of the
+Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in
+Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the
+corresponding Copyright Holder. This restriction only applies to the
+primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created using
+the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+=====
+
+FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+Neither the name of Adobe Systems Incorporated nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Lib/fontTools/__init__.py 
new/fonttools-3.21.0/Lib/fontTools/__init__.py
--- old/fonttools-3.20.1/Lib/fontTools/__init__.py      2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/__init__.py      2017-12-18 
13:24:42.000000000 +0100
@@ -5,6 +5,6 @@
 
 log = logging.getLogger(__name__)
 
-version = __version__ = "3.20.1"
+version = __version__ = "3.21.0"
 
 __all__ = ["version", "log", "configLogger"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Lib/fontTools/afmLib.py 
new/fonttools-3.21.0/Lib/fontTools/afmLib.py
--- old/fonttools-3.20.1/Lib/fontTools/afmLib.py        2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/afmLib.py        2017-12-18 
13:24:42.000000000 +0100
@@ -337,22 +337,13 @@
 
 
 def readlines(path):
-       f = open(path, 'rb')
-       data = f.read()
-       f.close()
-       # read any text file, regardless whether it's formatted for Mac, Unix 
or Dos
-       sep = ""
-       if '\r' in data:
-               sep = sep + '\r'        # mac or dos
-       if '\n' in data:
-               sep = sep + '\n'        # unix or dos
-       return data.split(sep)
+       with open(path, "r", encoding="ascii") as f:
+               data = f.read()
+       return data.splitlines()
 
 def writelines(path, lines, sep='\r'):
-       f = open(path, 'wb')
-       for line in lines:
-               f.write(line + sep)
-       f.close()
+       with open(path, "w", encoding="ascii", newline=sep) as f:
+               f.write("\n".join(lines) + "\n")
 
 
 if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Lib/fontTools/feaLib/builder.py 
new/fonttools-3.21.0/Lib/fontTools/feaLib/builder.py
--- old/fonttools-3.20.1/Lib/fontTools/feaLib/builder.py        2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/feaLib/builder.py        2017-12-18 
13:24:42.000000000 +0100
@@ -413,17 +413,16 @@
             return None
 
     def buildGDEFGlyphClassDef_(self):
-        inferredGlyphClass = {}
-        for lookup in self.lookups_:
-            inferredGlyphClass.update(lookup.inferGlyphClasses())
-        for markClass in self.parseTree.markClasses.values():
-            for markClassDef in markClass.definitions:
-                for glyph in markClassDef.glyphSet():
-                    inferredGlyphClass[glyph] = 3
         if self.glyphClassDefs_:
             classes = {g: c for (g, (c, _)) in self.glyphClassDefs_.items()}
         else:
-            classes = inferredGlyphClass
+            classes = {}
+            for lookup in self.lookups_:
+                classes.update(lookup.inferGlyphClasses())
+            for markClass in self.parseTree.markClasses.values():
+                for markClassDef in markClass.definitions:
+                    for glyph in markClassDef.glyphSet():
+                        classes[glyph] = 3
         if classes:
             result = otTables.GlyphClassDef()
             result.classDefs = classes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Lib/fontTools/subset/__init__.py 
new/fonttools-3.21.0/Lib/fontTools/subset/__init__.py
--- old/fonttools-3.20.1/Lib/fontTools/subset/__init__.py       2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/subset/__init__.py       2017-12-18 
13:24:42.000000000 +0100
@@ -56,7 +56,7 @@
   --glyphs=<glyphname>[,<glyphname>...]
       Specify comma/whitespace-separated PS glyph names to add to the subset.
       Note that only PS glyph names are accepted, not gidNNN, U+XXXX, etc
-      that are accepted on the command line.  The special string '*' wil keep
+      that are accepted on the command line.  The special string '*' will keep
       the entire glyph set.
   --glyphs-file=<path>
       Like --glyphs but reads from a file. Anything after a '#' on any line
@@ -2407,12 +2407,27 @@
             for subr in subrs.items:
                 subr.subset_subroutines (local_subrs, font.GlobalSubrs)
 
+        # Delete local SubrsIndex if empty
+        if hasattr(font, 'FDSelect'):
+            for fd in font.FDArray:
+                _delete_empty_subrs(fd.Private)
+        else:
+            _delete_empty_subrs(font.Private)
+
         # Cleanup
         for subrs in all_subrs:
             del subrs._used, subrs._old_bias, subrs._new_bias
 
     return True
 
+
+def _delete_empty_subrs(private_dict):
+    if hasattr(private_dict, 'Subrs') and not private_dict.Subrs:
+        if 'Subrs' in private_dict.rawDict:
+            del private_dict.rawDict['Subrs']
+        del private_dict.Subrs
+
+
 @_add_method(ttLib.getTableClass('cmap'))
 def closure_glyphs(self, s):
     tables = [t for t in self.tables if t.isUnicode()]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/TupleVariation.py 
new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/TupleVariation.py
--- old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/TupleVariation.py   
2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/TupleVariation.py   
2017-12-18 13:24:42.000000000 +0100
@@ -465,7 +465,8 @@
 
 
 def compileTupleVariationStore(variations, pointCount,
-                               axisTags, sharedTupleIndices):
+                               axisTags, sharedTupleIndices,
+                               useSharedPoints=True):
        variations = [v for v in variations if v.hasImpact()]
        if len(variations) == 0:
                return (0, b"", b"")
@@ -515,7 +516,7 @@
                        axisTags, sharedTupleIndices, sharedPoints=None)
                sharedTuple, sharedData, usesSharedPoints = v.compile(
                        axisTags, sharedTupleIndices, sharedPoints=usedPoints)
-               if (len(sharedTuple) + len(sharedData)) < (len(privateTuple) + 
len(privateData)):
+               if useSharedPoints and (len(sharedTuple) + len(sharedData)) < 
(len(privateTuple) + len(privateData)):
                        tuples.append(sharedTuple)
                        data.append(sharedData)
                        someTuplesSharePoints |= usesSharedPoints
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/_c_m_a_p.py 
new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/_c_m_a_p.py
--- old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/_c_m_a_p.py 2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/_c_m_a_p.py 2017-12-18 
13:24:42.000000000 +0100
@@ -887,8 +887,10 @@
                if codes: # yes, there are empty cmap tables.
                        codes = list(range(codes[0], codes[-1] + 1))
                        firstCode = codes[0]
-                       valueList = [cmap.get(code, ".notdef") for code in 
codes]
-                       valueList = map(ttFont.getGlyphID, valueList)
+                       valueList = [
+                               ttFont.getGlyphID(cmap[code]) if code in cmap 
else 0
+                               for code in codes
+                       ]
                        gids = array.array("H", valueList)
                        if sys.byteorder != "big":
                                gids.byteswap()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/_c_v_a_r.py 
new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/_c_v_a_r.py
--- old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/_c_v_a_r.py 2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/_c_v_a_r.py 2017-12-18 
13:24:42.000000000 +0100
@@ -30,12 +30,13 @@
         self.majorVersion, self.minorVersion = 1, 0
         self.variations = []
 
-    def compile(self, ttFont):
+    def compile(self, ttFont, useSharedPoints=False):
         tupleVariationCount, tuples, data = compileTupleVariationStore(
             variations=[v for v in self.variations if v.hasImpact()],
             pointCount=len(ttFont["cvt "].values),
             axisTags=[axis.axisTag for axis in ttFont["fvar"].axes],
-            sharedTupleIndices={})
+            sharedTupleIndices={},
+            useSharedPoints=useSharedPoints)
         header = {
             "majorVersion": self.majorVersion,
             "minorVersion": self.minorVersion,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/_p_o_s_t.py 
new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/_p_o_s_t.py
--- old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/_p_o_s_t.py 2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/_p_o_s_t.py 2017-12-18 
13:24:42.000000000 +0100
@@ -154,7 +154,8 @@
                assert len(glyphOrder) == numGlyphs
                indices = array.array("H")
                extraDict = {}
-               extraNames = self.extraNames
+               extraNames = self.extraNames = [
+                       n for n in self.extraNames if n not in 
standardGlyphOrder]
                for i in range(len(extraNames)):
                        extraDict[extraNames[i]] = i
                for glyphID in range(numGlyphs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/otBase.py 
new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/otBase.py
--- old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/otBase.py   2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/otBase.py   2017-12-18 
13:24:42.000000000 +0100
@@ -779,7 +779,7 @@
                return NotImplemented
 
        def getConverters(self):
-               return self.converters[self.Format]
+               return self.converters.get(self.Format, [])
 
        def getConverterByName(self, name):
                return self.convertersByName[self.Format][name]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/otTables.py 
new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/otTables.py
--- old/fonttools-3.20.1/Lib/fontTools/ttLib/tables/otTables.py 2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Lib/fontTools/ttLib/tables/otTables.py 2017-12-18 
13:24:42.000000000 +0100
@@ -481,7 +481,8 @@
                                        endID = len(glyphOrder)
                                glyphs.extend(glyphOrder[glyphID] for glyphID 
in range(startID, endID))
                else:
-                       assert 0, "unknown format: %s" % self.Format
+                       self.glyphs = []
+                       log.warning("Unknown Coverage format: %s" % self.Format)
 
        def preWrite(self, font):
                glyphs = getattr(self, "glyphs", None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/MANIFEST.in 
new/fonttools-3.21.0/MANIFEST.in
--- old/fonttools-3.20.1/MANIFEST.in    2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/MANIFEST.in    2017-12-18 13:24:42.000000000 +0100
@@ -1,5 +1,6 @@
 include README.rst
 include LICENSE
+include LICENSE.external
 include NEWS.rst
 include Makefile
 include fonttools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/NEWS.rst 
new/fonttools-3.21.0/NEWS.rst
--- old/fonttools-3.20.1/NEWS.rst       2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/NEWS.rst       2017-12-18 13:24:42.000000000 +0100
@@ -1,3 +1,16 @@
+3.21.0 (released 2017-12-18)
+----------------------------
+
+- [cmap] when compiling format6 subtable, don't assume gid0 is always called
+  '.notdef' (1e42224).
+- [ot] Allow decompiling fonts with bad Coverage format number (1aafae8).
+- Change FontTools licence to MIT (#1127).
+- [post] Prune extra names already in standard Mac set (df1e8c7).
+- [subset] Delete empty SubrsIndex after subsetting (#994, #1118).
+- [varLib] Don't share points in cvar by default, as it currently fails on
+  some browsers (#1113).
+- [afmLib] Make poor old afmLib work on python3.
+
 3.20.1 (released 2017-11-22)
 ----------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/README.rst 
new/fonttools-3.21.0/README.rst
--- old/fonttools-3.20.1/README.rst     2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/README.rst     2017-12-18 13:24:42.000000000 +0100
@@ -8,7 +8,7 @@
   project includes the TTX tool, that can convert TrueType and OpenType
   fonts to and from an XML text format, which is also called TTX. It
   supports TrueType, OpenType, AFM and to an extent Type 1 and some
-  Mac-specific formats. The project has a `BSD-style open-source
+  Mac-specific formats. The project has a `MIT open-source
   licence <LICENSE>`__.
 | Among other things this means you can use it free of charge.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Tests/afmLib/afmLib_test.py 
new/fonttools-3.21.0/Tests/afmLib/afmLib_test.py
--- old/fonttools-3.20.1/Tests/afmLib/afmLib_test.py    1970-01-01 
01:00:00.000000000 +0100
+++ new/fonttools-3.21.0/Tests/afmLib/afmLib_test.py    2017-12-18 
13:24:42.000000000 +0100
@@ -0,0 +1,55 @@
+from __future__ import print_function, division, absolute_import
+from fontTools.misc.py23 import *
+import unittest
+import os
+from fontTools import afmLib
+
+
+CWD = os.path.abspath(os.path.dirname(__file__))
+DATADIR = os.path.join(CWD, 'data')
+AFM = os.path.join(DATADIR, 'TestAFM.afm')
+
+
+class AFMTest(unittest.TestCase):
+
+       def test_read_afm(self):
+               afm = afmLib.AFM(AFM)
+               self.assertEqual(sorted(afm.kernpairs()), 
+                       sorted([('V', 'A'), ('T', 'comma'), ('V', 'd'), ('T', 
'c'), ('T', 'period')]))
+               self.assertEqual(afm['V', 'A'], -60)
+               self.assertEqual(afm['V', 'd'], 30)
+               self.assertEqual(afm['A'], (65, 668, (8, -25, 660, 666)))
+
+       def test_write_afm(self):
+               afm = afmLib.AFM(AFM)
+               newAfm, afmData = self.write(afm)
+               self.assertEqual(afm.kernpairs(), newAfm.kernpairs())
+               self.assertEqual(afm.chars(), newAfm.chars())
+               self.assertEqual(afm.comments(), newAfm.comments()[1:])  # skip 
the "generated by afmLib" comment
+               for pair in afm.kernpairs():
+                       self.assertEqual(afm[pair], newAfm[pair])
+               for char in afm.chars():
+                       self.assertEqual(afm[char], newAfm[char])
+               with open(AFM, 'r') as f:
+                       originalLines = f.read().splitlines()
+               newLines = afmData.splitlines()
+               del newLines[1]  # remove the "generated by afmLib" comment
+               self.assertEqual(originalLines, newLines)
+
+       @staticmethod
+       def write(afm, sep='\r'):
+               temp = os.path.join(DATADIR, 'temp.afm')
+               try:
+                       afm.write(temp, sep)
+                       with open(temp, 'r') as f:
+                               afmData = f.read()
+                       afm = afmLib.AFM(temp)
+               finally:
+                       if os.path.exists(temp):
+                               os.remove(temp)
+               return afm, afmData
+
+
+if __name__ == '__main__':
+       import sys
+       sys.exit(unittest.main())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Tests/afmLib/data/TestAFM.afm 
new/fonttools-3.21.0/Tests/afmLib/data/TestAFM.afm
--- old/fonttools-3.20.1/Tests/afmLib/data/TestAFM.afm  1970-01-01 
01:00:00.000000000 +0100
+++ new/fonttools-3.21.0/Tests/afmLib/data/TestAFM.afm  2017-12-18 
13:24:42.000000000 +0100
@@ -0,0 +1,37 @@
+StartFontMetrics 2.0
+Comment UniqueID 2123703
+Comment Panose 2 0 6 3 3 0 0 2 0 4
+FontName TestFont-Regular
+FullName TestFont-Regular
+FamilyName TestFont
+Weight Regular
+ItalicAngle 0.00
+IsFixedPitch false
+FontBBox -94 -317 1316 1009
+UnderlinePosition -296
+UnderlineThickness 111
+Version 001.000
+Notice [c] Copyright 2017. All Rights Reserved.
+EncodingScheme FontSpecific
+CapHeight 700
+XHeight 500
+Ascender 750
+Descender -250
+StdHW 181
+StdVW 194
+StartCharMetrics 4
+C 32 ; WX 200 ; N space ; B 0 0 0 0 ;
+C 65 ; WX 668 ; N A ; B 8 -25 660 666 ;
+C 66 ; WX 543 ; N B ; B 36 0 522 666 ;
+C 67 ; WX 582 ; N C ; B 24 -21 564 687 ;
+EndCharMetrics
+StartKernData
+StartKernPairs 5
+KPX T c 30
+KPX T comma -100
+KPX T period -100
+KPX V A -60
+KPX V d 30
+EndKernPairs
+EndKernData
+EndFontMetrics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Tests/subset/data/expect_desubroutinize_CFF.ttx 
new/fonttools-3.21.0/Tests/subset/data/expect_desubroutinize_CFF.ttx
--- old/fonttools-3.20.1/Tests/subset/data/expect_desubroutinize_CFF.ttx        
2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Tests/subset/data/expect_desubroutinize_CFF.ttx        
2017-12-18 13:24:42.000000000 +0100
@@ -33,9 +33,6 @@
         <initialRandomSeed value="0"/>
         <defaultWidthX value="267"/>
         <nominalWidthX value="448"/>
-        <Subrs>
-          <!-- The 'index' attribute is only for humans; it is ignored when 
parsed. -->
-        </Subrs>
       </Private>
       <CharStrings>
         <CharString name=".notdef">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Tests/subset/data/expect_no_hinting_desubroutinize_CFF.ttx 
new/fonttools-3.21.0/Tests/subset/data/expect_no_hinting_desubroutinize_CFF.ttx
--- 
old/fonttools-3.20.1/Tests/subset/data/expect_no_hinting_desubroutinize_CFF.ttx 
    2017-11-22 18:42:53.000000000 +0100
+++ 
new/fonttools-3.21.0/Tests/subset/data/expect_no_hinting_desubroutinize_CFF.ttx 
    2017-12-18 13:24:42.000000000 +0100
@@ -32,9 +32,6 @@
         <initialRandomSeed value="0"/>
         <defaultWidthX value="267"/>
         <nominalWidthX value="448"/>
-        <Subrs>
-          <!-- The 'index' attribute is only for humans; it is ignored when 
parsed. -->
-        </Subrs>
       </Private>
       <CharStrings>
         <CharString name=".notdef">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Tests/subset/data/expect_no_notdef_outline_cid.ttx 
new/fonttools-3.21.0/Tests/subset/data/expect_no_notdef_outline_cid.ttx
--- old/fonttools-3.20.1/Tests/subset/data/expect_no_notdef_outline_cid.ttx     
2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Tests/subset/data/expect_no_notdef_outline_cid.ttx     
2017-12-18 13:24:42.000000000 +0100
@@ -43,9 +43,6 @@
             <initialRandomSeed value="0"/>
             <defaultWidthX value="1000"/>
             <nominalWidthX value="107"/>
-            <Subrs>
-              <!-- The 'index' attribute is only for humans; it is ignored 
when parsed. -->
-            </Subrs>
           </Private>
         </FontDict>
       </FDArray>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Tests/subset/data/expect_no_notdef_outline_otf.ttx 
new/fonttools-3.21.0/Tests/subset/data/expect_no_notdef_outline_otf.ttx
--- old/fonttools-3.20.1/Tests/subset/data/expect_no_notdef_outline_otf.ttx     
2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Tests/subset/data/expect_no_notdef_outline_otf.ttx     
2017-12-18 13:24:42.000000000 +0100
@@ -33,9 +33,6 @@
         <initialRandomSeed value="0"/>
         <defaultWidthX value="500"/>
         <nominalWidthX value="300"/>
-        <Subrs>
-          <!-- The 'index' attribute is only for humans; it is ignored when 
parsed. -->
-        </Subrs>
       </Private>
       <CharStrings>
         <CharString name=".notdef">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fonttools-3.20.1/Tests/subset/data/expect_notdef_width_cid.ttx 
new/fonttools-3.21.0/Tests/subset/data/expect_notdef_width_cid.ttx
--- old/fonttools-3.20.1/Tests/subset/data/expect_notdef_width_cid.ttx  
2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Tests/subset/data/expect_notdef_width_cid.ttx  
2017-12-18 13:24:42.000000000 +0100
@@ -38,9 +38,6 @@
             <initialRandomSeed value="0"/>
             <defaultWidthX value="602"/>
             <nominalWidthX value="630"/>
-            <Subrs>
-              <!-- The 'index' attribute is only for humans; it is ignored 
when parsed. -->
-            </Subrs>
           </Private>
         </FontDict>
         <FontDict index="1">
@@ -56,9 +53,6 @@
             <initialRandomSeed value="0"/>
             <defaultWidthX value="1000"/>
             <nominalWidthX value="107"/>
-            <Subrs>
-              <!-- The 'index' attribute is only for humans; it is ignored 
when parsed. -->
-            </Subrs>
           </Private>
         </FontDict>
       </FDArray>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/Tests/ttLib/tables/_c_v_a_r_test.py 
new/fonttools-3.21.0/Tests/ttLib/tables/_c_v_a_r_test.py
--- old/fonttools-3.20.1/Tests/ttLib/tables/_c_v_a_r_test.py    2017-11-22 
18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/Tests/ttLib/tables/_c_v_a_r_test.py    2017-12-18 
13:24:42.000000000 +0100
@@ -18,31 +18,43 @@
     "0004 "           # 16: tvHeader[1].variationDataSize=4
     "8000 "           # 18: tvHeader[1].tupleIndex=EMBEDDED_PEAK
     "C000 3333 "      # 20: tvHeader[1].peakTuple=[-1.0, 0.8]
-    "00 "             # 24: shared values = 00, all values
+    "03 02 02 01 01"  # 24: shared_pointCount=03, run_count=2 cvt=[2, 3, 4]
     "02 03 01 04 "    # 25: deltas=[3, 1, 4]
     "02 09 07 08")    # 29: deltas=[9, 7, 8]
 
+CVAR_PRIVATE_POINT_DATA = deHexStr(
+    "0001 0000 "                    #  0: majorVersion=1 minorVersion=0
+    "0002 0018 "                    #  4: tupleVariationCount=2 offsetToData=24
+    "0009 "                         #  8: tvHeader[0].variationDataSize=9
+    "A000 "                         # 10: 
tvHeader[0].tupleIndex=EMBEDDED_PEAK|PRIVATE_POINT_NUMBERS
+    "4000 0000 "                    # 12: tvHeader[0].peakTuple=[1.0, 0.0]
+    "0009 "                         # 16: tvHeader[1].variationDataSize=9
+    "A000 "                         # 18: 
tvHeader[1].tupleIndex=EMBEDDED_PEAK|PRIVATE_POINT_NUMBERS
+    "C000 3333 "                    # 20: tvHeader[1].peakTuple=[-1.0, 0.8]
+    "03 02 02 01 01 02 03 01 04 "   # 24: pointCount=3 run_count=2 cvt=2 1 1 
run_count=2 deltas=[3, 1, 4]
+    "03 02 02 01 01 02 09 07 08 ")  # 33: pointCount=3 run_count=2 cvt=2 1 1 
run_count=2 deltas=[9, 7, 8]
+
 CVAR_XML = [
     '<version major="1" minor="0"/>',
     '<tuple>',
     '  <coord axis="wght" value="1.0"/>',
-    '  <delta cvt="0" value="3"/>',
-    '  <delta cvt="1" value="1"/>',
-    '  <delta cvt="2" value="4"/>',
+    '  <delta cvt="2" value="3"/>',
+    '  <delta cvt="3" value="1"/>',
+    '  <delta cvt="4" value="4"/>',
     '</tuple>',
     '<tuple>',
     '  <coord axis="wght" value="-1.0"/>',
     '  <coord axis="wdth" value="0.8"/>',
-    '  <delta cvt="0" value="9"/>',
-    '  <delta cvt="1" value="7"/>',
-    '  <delta cvt="2" value="8"/>',
+    '  <delta cvt="2" value="9"/>',
+    '  <delta cvt="3" value="7"/>',
+    '  <delta cvt="4" value="8"/>',
     '</tuple>',
 ]
 
 CVAR_VARIATIONS = [
-    TupleVariation({"wght": (0.0, 1.0, 1.0)}, [3, 1, 4]),
+    TupleVariation({"wght": (0.0, 1.0, 1.0)}, [None, None, 3, 1, 4]),
     TupleVariation({"wght": (-1, -1.0, 0.0), "wdth": (0.0, 0.8, 0.8)},
-                   [9, 7, 8]),
+                   [None, None, 9, 7, 8]),
 ]
 
 
@@ -50,7 +62,7 @@
     def makeFont(self):
         cvt, cvar, fvar = newTable("cvt "), newTable("cvar"), newTable("fvar")
         font = {"cvt ": cvt, "cvar": cvar, "fvar": fvar}
-        cvt.values = [0, 1000, -2000]
+        cvt.values = [0, 0, 0, 1000, -2000]
         Axis = getTableModule("fvar").Axis
         fvar.axes = [Axis(), Axis()]
         fvar.axes[0].axisTag, fvar.axes[1].axisTag = "wght", "wdth"
@@ -59,10 +71,22 @@
     def test_compile(self):
         font, cvar = self.makeFont()
         cvar.variations = CVAR_VARIATIONS
-        self.assertEqual(hexStr(cvar.compile(font)), hexStr(CVAR_DATA))
+        self.assertEqual(hexStr(cvar.compile(font)), 
hexStr(CVAR_PRIVATE_POINT_DATA))
+
+    def test_compile_shared_points(self):
+        font, cvar = self.makeFont()
+        cvar.variations = CVAR_VARIATIONS
+        self.assertEqual(hexStr(cvar.compile(font, useSharedPoints=True)), 
hexStr(CVAR_DATA))
 
     def test_decompile(self):
         font, cvar = self.makeFont()
+        cvar.decompile(CVAR_PRIVATE_POINT_DATA, font)
+        self.assertEqual(cvar.majorVersion, 1)
+        self.assertEqual(cvar.minorVersion, 0)
+        self.assertEqual(cvar.variations, CVAR_VARIATIONS)
+
+    def test_decompile_shared_points(self):
+        font, cvar = self.makeFont()
         cvar.decompile(CVAR_DATA, font)
         self.assertEqual(cvar.majorVersion, 1)
         self.assertEqual(cvar.minorVersion, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/setup.cfg 
new/fonttools-3.21.0/setup.cfg
--- old/fonttools-3.20.1/setup.cfg      2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/setup.cfg      2017-12-18 13:24:42.000000000 +0100
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 3.20.1
+current_version = 3.21.0
 commit = True
 tag = False
 tag_name = {new_version}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fonttools-3.20.1/setup.py 
new/fonttools-3.21.0/setup.py
--- old/fonttools-3.20.1/setup.py       2017-11-22 18:42:53.000000000 +0100
+++ new/fonttools-3.21.0/setup.py       2017-12-18 13:24:42.000000000 +0100
@@ -37,7 +37,7 @@
        "Environment :: Other Environment",
        "Intended Audience :: Developers",
        "Intended Audience :: End Users/Desktop",
-       "License :: OSI Approved :: BSD License",
+       "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
@@ -309,14 +309,14 @@
 
 setup(
        name="fonttools",
-       version="3.20.1",
+       version="3.21.0",
        description="Tools to manipulate font files",
        author="Just van Rossum",
        author_email="j...@letterror.com",
        maintainer="Behdad Esfahbod",
        maintainer_email="beh...@behdad.org",
        url="http://github.com/fonttools/fonttools";,
-       license="OpenSource, BSD-style",
+       license="MIT",
        platforms=["Any"],
        long_description=long_description,
        package_dir={'': 'Lib'},


Reply via email to