70 Commits

Author SHA1 Message Date
Behdad Esfahbod
a11bc5655d [merge] Ignore LangSys if None
Fixes https://github.com/fonttools/fonttools/issues/739
for now, though proper fix is more complicated.

This was hit now because the subsetter was changed a while back
to retain script systems even if empty...  I don't like that.
2016-11-08 14:06:50 -08:00
Michael Yin
18b905b06d [ttLib/pyftmerge] Handle cmap merge better (#635)
Changed the merge algorithm to properly handle cmap subtables
of type 4 and 12 with platform id and encoding ids of 3/1 and 3/10
respectively. All other subtables are not merged and ignored.
The resulting merged cmap table includes a subtable of format 4/3/1
and a format 12 subtable iff there are mappings outside of the BMP.

If one font has two codepoints that point to the same glyph,
and another font has the same code points pointing to two other glyphs,
keep the behavior where the first replacement glyph is stored in 'locl'
and output the third glpyh (or more) to let the user know that they were
dropped, instead of failing to merge the font.

Fixes #444
Fixes #322
2016-07-13 14:00:36 -07:00
Behdad Esfahbod
3b8387fa45 [merge] Sort FeatureList by feature tag
Fixes https://github.com/behdad/fonttools/issues/444
2016-07-11 17:02:26 -07:00
Behdad Esfahbod
53d78d9956 [merge] Fix for ClassDef.Format and Coverage.Format
Part of https://github.com/behdad/fonttools/issues/444
2016-07-11 16:30:14 -07:00
Cosimo Lupo
6544482d92 [merge] remove custom Logger and use logging instead
this follows the same changes applied to subset.py module in d03ce32
2016-01-27 19:05:05 +00:00
Behdad Esfahbod
02b0169a8a [merge] Fix for f0eb7e98ca0642f17ac82433db8c957fffd6a9d3 2016-01-13 17:03:31 +00:00
Miguel Sousa
a7aef47695 fix "indentation contains mixed spaces and tabs" errors reported by Landscape 2015-08-09 00:33:50 -07:00
Cosimo Lupo
72481f5050 [merge] fix TabError: inconsistent use of tabs and spaces in indentation 2015-06-14 19:45:20 +01:00
Behdad Esfahbod
6df41da4ff Use timestampNow() in merge.py 2015-06-12 16:11:31 -07:00
Behdad Esfahbod
37e6e6a380 Use dict comprehension now that we don't support Python 2.6 2015-06-11 17:05:15 -07:00
Cosimo Lupo
175a16209c [setup.py] use setuptools if available, or fall back to distutils
modify scripts to work as setuptools 'console_scripts', where the main
function takes no arguments;
add empty identifier "" in 'packages' argument of setup, to install the
standalone sstruct.py and xmlWriter.py for legacy support;
remove py2exe since it is made redundant by setuptools 'console_scripts';
remove custom 'build_ext' command since the eexecOpmodule.c is no longer
present.
2015-05-20 11:02:43 +01:00
Behdad Esfahbod
df2906b0ad Fix a few issues found by landscape.io 2015-04-26 02:17:13 -04:00
Behdad Esfahbod
b30e12ae00 More whitespace 2015-04-26 02:01:01 -04:00
Behdad Esfahbod
bd67253118 Some more whitespace fixes from pep8 tool 2015-04-26 01:59:01 -04:00
Behdad Esfahbod
19dadb37d6 One can't import fontTools.subset and fontTools.merge together
Fixes https://github.com/behdad/fonttools/issues/177
2014-10-07 17:37:29 -07:00
Behdad Esfahbod
68921c97ea [merge] Fails if 'GSUB' table not present
Fixes https://github.com/behdad/fonttools/issues/135

Or does it?
2014-07-09 17:13:16 -04:00
Behdad Esfahbod
d04dc9df11 [merge] Add preliminary support for BASE table 2014-07-03 14:01:44 -04:00
Behdad Esfahbod
6cc8bc3dbd [merge] Support Extension lookups 2014-07-03 13:46:23 -04:00
Behdad Esfahbod
14f13a993e [merge] Remove Python 2.7 dict comprehension syntax
Hopefully 2.6-happy again.
2014-04-02 18:54:53 -07:00
Behdad Esfahbod
8fec68796d [merge] Map duplicate glyphs using synthesized GSUB 'locl' tables 2014-03-28 17:41:01 -07:00
Behdad Esfahbod
d0903e3bb3 . 2014-03-28 16:39:49 -07:00
Behdad Esfahbod
2772d8496e [merge] Minor 2014-03-28 15:37:18 -07:00
Behdad Esfahbod
59a2c05137 [merge] Minor 2014-03-28 15:13:10 -07:00
Behdad Esfahbod
0884507c0e [merge] Minor 2014-03-28 15:02:40 -07:00
Behdad Esfahbod
201a681821 [merge] Minor 2014-03-28 14:58:12 -07:00
Behdad Esfahbod
0e235becc5 [merge] Comment 2014-03-28 14:56:27 -07:00
Behdad Esfahbod
7765421ab7 [merge] Allow merging OS/2 tables of different versions 2014-03-28 14:48:09 -07:00
Behdad Esfahbod
82c54638e3 [merge] Install merged dict on object 2014-03-28 14:41:53 -07:00
Behdad Esfahbod
0d5fcf498c [merge] Rename 2014-03-28 14:39:31 -07:00
Behdad Esfahbod
5a5d0affff [merge] Support missing GSUB/GPOS/etc
This is a hack for now.  Will clean up in upcoming commits.
2014-03-28 14:11:38 -07:00
Behdad Esfahbod
b8039e2653 [merge] Rename 2014-03-28 13:54:37 -07:00
Behdad Esfahbod
477dad1ee8 [merge] Improve assert 2014-03-28 13:52:48 -07:00
Behdad Esfahbod
f480c7cf21 [merge] Use CmapSubtable.isUnicode() 2014-03-12 12:18:47 -07:00
Behdad Esfahbod
5080331251 [merge] Map recursive lookups
Fixes https://github.com/behdad/fonttools/issues/109
2014-02-10 18:14:37 -05:00
Behdad Esfahbod
27c71f9f60 Retain hinting for first font
Part of https://github.com/behdad/fonttools/issues/95
2014-01-27 21:01:45 -05:00
Behdad Esfahbod
1ae29591ef from __future__ import absolute_import
Such that our Python 2 is closer to Python 3.

Part of https://github.com/behdad/fonttools/issues/77
2014-01-14 15:07:50 +08:00
Behdad Esfahbod
972af5af63 [merge] Sort script records 2013-12-31 18:16:36 +08:00
Behdad Esfahbod
233663207d [merge] Minor 2013-12-31 18:12:53 +08:00
Roozbeh Pournader
642eaf135d Properly merge head.flags and OS/2.fsType
Also install the merge script.
2013-12-22 15:33:25 -05:00
Behdad Esfahbod
35e3c7270d Minor 2013-12-20 21:34:09 -05:00
Behdad Esfahbod
b76d6ff14a [merge] Remove BaseTable.__hash__ need 2013-12-20 20:24:27 -05:00
Roozbeh Pournader
7a27214fcb Added merging tables for 'name' and 'gasp'. 2013-12-20 20:13:55 -05:00
Behdad Esfahbod
398770d51c [merge] Map GSUB/GPOS feature / lookup indices properly 2013-12-19 15:30:24 -05:00
Behdad Esfahbod
c68c0ff12f [merge] Minor 2013-12-19 14:25:17 -05:00
Behdad Esfahbod
2642934116 [merge] Add GSUB/GPOS
Doesn't renumber features / lookups yet.
2013-12-19 11:53:47 -05:00
Behdad Esfahbod
12dd547c01 [merge] Port GDEF to mergeMap
There's some code duplication in mergeObjects that I'll refactor
later.
2013-12-19 05:58:57 -05:00
Behdad Esfahbod
92fd566577 [merge] Use NotImplemented as a singleton meaning "doesn't have"
And cleanup recalculate, so we don't accidentally mess something
that is NOT recalculated.
2013-12-19 05:27:53 -05:00
Behdad Esfahbod
6baf26ea74 [merge] Rename 2013-12-19 04:49:07 -05:00
Behdad Esfahbod
3b36f55adf [merge] Move tables out of merger object 2013-12-19 04:45:17 -05:00
Behdad Esfahbod
9e6adb6bd6 [merge] Move to per-class mergeMap 2013-12-19 04:37:48 -05:00