Cosimo Lupo
d1a27bd671
subset: add --recalc-average-width command-line option (on by default); log message if xAvgCharWidth changed
2016-07-19 22:54:05 +01:00
Cosimo Lupo
9e148a409d
Merge pull request #636 from khaledhosny/subset-xAvgCharWidth
...
[subset] Recalculate OS/2.xAvgCharWidth
2016-07-19 22:35:28 +01:00
Khaled Hosny
efb32d5402
[subset] Recalculate OS/2.xAvgCharWidth
2016-07-18 01:35:18 +02:00
Behdad Esfahbod
10aaac53f2
Fix test
2016-07-16 21:58:41 -07:00
Behdad Esfahbod
81d84e6f85
Fix PointInsidePen
...
https://github.com/behdad/fonttools/issues/621
2016-07-16 21:47:37 -07:00
Behdad Esfahbod
9c037fc826
[gvar] Add TODO
2016-07-16 21:22:20 -07:00
Miguel Sousa
a00cacea96
Two more tests for pointInsidePen ( #622 )
2016-07-16 21:22:04 -07:00
Behdad Esfahbod
b1eeaa5151
[gvar] Fix point encoding
...
Where more than one run is used, it's only the first run's first point
that is absolute, all other values are relative.
Similar fix landing in FreeType soon. Fixes lizzard glyph (glyphname
"dollar") in Zycon.
2016-07-15 18:15:17 -07: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
5cd1fbaff6
[subset] Clear CFF Encoding vector
...
Fixes https://github.com/behdad/fonttools/issues/620
2016-07-13 00:33:41 -07:00
Behdad Esfahbod
e9fb97d858
Fix overflow-fixing of Extension subtables
...
Fixes https://github.com/behdad/fonttools/issues/574
This was broken by 319643ad. Ouch!
Was quite a debugging session to pin it down.
2016-07-12 23:55:47 -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
Behdad Esfahbod
501e1f2f7e
[symfont] Remove another level of indirection
...
Saves another few percents, though not as much as previous commit.
2016-07-11 12:23:56 -07:00
Behdad Esfahbod
7fd9dce0e9
[symfont] Speed up a bit
...
Remove one level of indirection in access to point data in generated
functions; ie. use p0, p1, ... instead of P[0], P[1], ...
Makes for about 10% speedup.
2016-07-11 12:23:56 -07:00
Behdad Esfahbod
cde56fce66
[symfont] Minor
2016-07-11 12:23:56 -07:00
Cosimo Lupo
1d809ac92f
Merge pull request #632 from miguelsousa/cff-fix
...
Fix xml-roundtripping of CFF fonts (name-keyed & cid-keyed)
2016-07-06 19:48:59 +01:00
Miguel Sousa
8bf1bd4f30
[cff] fix fetching of fdSelectIndex value
2016-07-06 10:27:02 -06:00
Miguel Sousa
c04a6d922c
[cff] fdSelect array only exists in CID fonts, so test for the presence of fdArray and set the selector value to None otherwise
2016-07-06 04:23:43 -06:00
Cosimo Lupo
9c6c4c4f4c
merge_woff_metadata.py: make sure flavor is in "woff" or "woff2"
2016-07-04 16:11:04 +01:00
Cosimo Lupo
0782513d4d
Snippets: add 'merge_woff_metadata.py' and 'dump_woff_metatada.py' scripts
...
This is just to exemplify how one could use the `TTFont.flavorData` attribute to get/set the WOFF metadata.
See discussion at https://github.com/behdad/fonttools/issues/630
2016-07-04 15:51:51 +01:00
Denis Moyogo Jacquerye
384b050b08
Merge pull request #629 from jamesgk/mtilib-cmap
...
Add cmap handling to mtiLib
2016-06-30 22:32:54 +01:00
James Godfrey-Kittle
797061679a
[mtiLib] Make tables in parsers, don't pass in
2016-06-30 14:16:58 -07:00
James Godfrey-Kittle
1b61637473
Add cmap handling to mtiLib
2016-06-30 12:50:39 -07:00
Behdad Esfahbod
3868ac845f
[Snippets/interpolatable.py] Flesh out some more
2016-06-24 19:00:56 -04:00
Sascha Brawer
42177e03b7
Merge pull request #625 from jamesgk/fealib-scriptlang
...
[feaLib] Don't set language when script is unset
2016-06-23 15:44:44 +02:00
James Godfrey-Kittle
5c723ebfb0
[feaLib] Don't assume feature has lookups in DFLT
...
It's possible for all of a feature's lookups to be in specific script
and/or language systems, so this code could crash.
2016-06-22 16:19:45 -07:00
James Godfrey-Kittle
e2186dec53
[feaLib] Don't set language when script is unset
...
Before, if someone tried to set the language before setting the script
a None/language language system would be created (with actual tag
"None" stored in the feature table). This defaults to tag DFLT and
fails when a non-dflt language is set for DFLT, since that's illegal.
2016-06-22 11:29:42 -07:00
Sascha Brawer
87f86424ca
Merge pull request #623 from jamesgk/fealib-scriptlang
...
[feaLib] Fix exclude_dflt handling
2016-06-22 08:28:57 +02:00
James Godfrey-Kittle
aaf9294d97
[feaLib] Add another test for language systems
2016-06-21 16:40:17 -07:00
James Godfrey-Kittle
d1af1cfd4a
[feaLib] Fix exclude_dflt handling
...
This is to fix what I think was a misunderstanding of the exclude_dflt
keyword (and the implicit include_dflt option active by default).
Rather than including the following lookups in the default language
systems, I think it is used to include the lookups specific to default
language systems in the system defined by the current language
statement. Thus instead of registering a lookup in all default
systems when include_dflt is true, we should exclude the lookups
registered with default systems from the current system when
include_dflt is false.
2016-06-21 16:39:27 -07:00
Behdad Esfahbod
0deb34829c
[Snippets/interpolatable.py] Add preliminary script for detecting interpolation errors
...
Very basic. Right now detects if glyphs have wrong order of contours / components.
2016-06-15 18:46:59 +04:00
Behdad Esfahbod
220ff2b238
[pens.areaPen] Clean up a bit
...
Based on discussion in
https://github.com/behdad/fonttools/pull/618#issuecomment-226105824
2016-06-15 14:10:44 +04:00
Behdad Esfahbod
b3414e9ffd
[symfont] Use AreaPen from fontTools
...
It's about 20% faster.
2016-06-14 01:26:39 -04:00
Behdad Esfahbod
acbd3df647
[symfont] Add function to print function sources for caching
2016-06-14 01:23:40 -04:00
Behdad Esfahbod
1a48fc27a1
[symfont] Remove one level of function call
2016-06-14 01:16:57 -04:00
Behdad Esfahbod
b0b049774c
Implement analytical curve length for quadratic beziers
...
This is multiple times faster, and tolerance-independent.
I'll explain how I arrived at this later.
2016-06-13 20:08:50 -04:00
Behdad Esfahbod
56c27f45c9
Speed up perimeterPen
...
It's still too slow, but an improvement.
Also, remove duplicate copy from symfont.
2016-06-13 18:50:01 -04:00
Behdad Esfahbod
71fb49962a
Improve perimeterPen tests
...
The tolerance on the pen is set to 0.5%, so it does not make sense
to test for accuracy for anything more than integers given the
values.
2016-06-13 18:47:03 -04:00
Behdad Esfahbod
b7cf54aef1
[symfont] Minor
2016-06-13 18:20:42 -04:00
Cosimo Lupo
04c19fda80
Merge pull request #619 from miguelsousa/pen-tests
...
AreaPen and PerimeterPen unit tests
2016-06-13 06:23:00 +01:00
Miguel Sousa
9efcaf05e4
Unit tests for AreaPen and PerimeterPen
2016-06-12 15:46:52 -07:00
Miguel Sousa
92e8455259
perimeterPen.py: make glyphset the first argument (like in all other pens)
2016-06-12 15:46:04 -07:00
Cosimo Lupo
b73b432add
Merge pull request #618 from anthrotype/area-pen
...
Area and Perimeter pens
2016-06-12 12:51:09 +01:00
Cosimo Lupo
c5ed6c6456
perimeterPen.py: handle implied lineTo in closePath
2016-06-12 11:49:00 +01:00
Cosimo Lupo
d51b88a234
areaPen.py: remove unused 'interpolate' function; call polygon_area directly in closePath
2016-06-12 11:37:02 +01:00
Cosimo Lupo
39f919f1f1
areaPen.py: calculate area under quadratic curve directly, using Green theorem
2016-06-12 03:14:09 +01:00
Cosimo Lupo
5f0e48e649
areaPen.py: make sure the first and last points of contour overlap
2016-06-12 03:13:32 +01:00
Cosimo Lupo
38359b054d
areaPen.py: invert sign of area (CCW is now positive)
2016-06-12 03:12:02 +01:00
Cosimo Lupo
c08e47ed47
perimeterPen.py: copy PerimeterPen from symfont.py
2016-06-11 23:07:23 +01:00