9304 Commits

Author SHA1 Message Date
Cosimo Lupo
1b2af584ff requirements.txt: use the latest Brotli 0.5.2 2016-08-12 11:14:42 +01:00
Behdad Esfahbod
9b3660df9f pointInsidePen: Disallow endPath()
https://github.com/behdad/fonttools/issues/621#issuecomment-234764830
2016-08-10 17:31:29 -07:00
Behdad Esfahbod
f3ff2f8881 pointInsidePen: add getWinding()
Resolves https://github.com/behdad/fonttools/issues/621#issuecomment-234764830

Although, leaving contours left open is out of protocol behavior
IMO.
2016-08-10 17:30:33 -07:00
Behdad Esfahbod
5cd0a55635 Ignore up to 4 bytes excess in kern subtables
Fixes https://github.com/behdad/fonttools/issues/314

Previously the warning message was wrong (probably a regression)
as it was reporting the the length of all kern data as "excess".
Fixing that, I see 4 bytes excess in Calibri.  Up to 4 is alright,
since many compilers add padding and wrongly add 4 instead of 0
sometimes.
2016-08-08 13:02:34 -07:00
Cosimo Lupo
fae8e1b498 Merge pull request #631 from anthrotype/woff-metadata-snippets
Snippets: add 'merge_woff_metadata.py' and 'dump_woff_metatada.py' scripts
2016-08-07 19:28:21 +01:00
Cosimo Lupo
4d7cd66ebc tox.ini: drop py33 testenv 2016-08-06 19:46:22 +01:00
Cosimo Lupo
9e60c3faff Merge pull request #649 from behdad/no-py33
.travis.yml: drop Python 3.3 support
2016-08-06 19:43:50 +01:00
Cosimo Lupo
b6ab441a1a .travis.yml: drop Python 3.3 support 2016-08-06 19:29:35 +01:00
Cosimo Lupo
189fac4758 setup.py: pep8 whitespace; remove unused imports 2016-08-06 13:37:39 +01:00
Cosimo Lupo
8e3b30a078 Revert "setup.py: version 3.1"
This reverts commit cef46f09cf2ddac7e4cd34ed385a094877a8bc4e.

Let's change the package version string only when we are ready to tag the new release.
2016-08-06 13:30:15 +01:00
Cosimo Lupo
c4df73beb6 Merge pull request #647 from anthrotype/pypi
[Travis] auto deploy to PyPI on tags
2016-08-06 13:27:21 +01:00
Cosimo Lupo
900a250896 .travis.yml: enable automatic PyPI deployment from Travis upon tags 2016-08-06 13:10:52 +01:00
Cosimo Lupo
cef46f09cf setup.py: version 3.1 2016-08-06 11:59:00 +01:00
Cosimo Lupo
6b2ac939dd add setup.cfg specifying 'universal' py2-py3 wheel format 2016-08-06 11:40:53 +01:00
Cosimo Lupo
4dc937ff11 Merge pull request #646 from anthrotype/brotli-0.4
requirements.txt: download Brotli 0.4.0 pre-compiled wheel from Github Releases
2016-08-06 11:38:24 +01:00
Cosimo Lupo
64d055c742 requirements.txt: download Brotli 0.4.0 pre-compiled wheel (or sdist) from Github Releases
this should speed up the Travis and Appveyor builds, as we don't need to compile
Brotli from source, at least on OSX and Windows. Linux will still use the
.tag.gz source distribution.
2016-08-06 11:30:41 +01:00
Behdad Esfahbod
ab3c0f82e6 Merge pull request #44 from googlei18n/more-optimizations
More optimizations
2016-08-01 18:11:49 -07:00
Behdad Esfahbod
c53ea86826 Use a generator for cubics[]
Not huge fan of it, but shows slight speedup, and is "Pythonic".
2016-08-01 18:10:16 -07:00
Behdad Esfahbod
9db52c9483 Avoid some more work
Saves another 7%.  Somehow I failed to push this to the last batch.
2016-08-01 14:34:41 -07:00
James Godfrey-Kittle
f5d067db86 Merge pull request #42 from googlei18n/fix-tests
Fix tests
2016-08-01 14:17:31 -07:00
James Godfrey-Kittle
fc5f5d194d Fix tests 2016-08-01 14:15:26 -07:00
Behdad Esfahbod
33478a9e49 Merge pull request #40 from googlei18n/never-say-never
Never say never
2016-08-01 14:11:46 -07:00
James Godfrey-Kittle
daaa1bd06f Report number of segments in result, not points (#41)
For some reason, I was subtracting 1 from the spline lengths in the
test report. Not sure why that is, so I've assumed it was wrong (and
now we subtract 2 to get the length in number of segments).
2016-08-01 14:08:26 -07:00
Behdad Esfahbod
17b034c904 In curves_to_quadratic(), avoid some more work
When a curve fails to convert at a certain n, keep increasing n for
this curve until a fit found.  Saves another 7% in the benchmark.
2016-07-29 20:31:38 -07:00
Behdad Esfahbod
06eb980a0c Split off case of n=1 into its own function
Looks like changes like this don't have measurable performance
penalty, but they do help with analyzing profile output to see
which branch (n=1 or n!=1) takes more time.
2016-07-29 20:31:38 -07:00
Behdad Esfahbod
96eb3baa15 Add specialization of split_cubic_into_n() for n=6
...by calling split_cubic_into_three() twice.  Gives another 5..9%
speedup.  The thing is, while higher n values are lower-frequency,
the savings are also bigger.  So the two offset out.
2016-07-29 20:31:38 -07:00
Behdad Esfahbod
6d811003ed Add specialization of split_cubic_into_n() for n=4
...by calling split_cubic_into_two() twice.  Gives another 5% speedup.
2016-07-29 20:31:38 -07:00
Behdad Esfahbod
44235274cd Remove variable that was used once. 2016-07-29 20:31:38 -07:00
Behdad Esfahbod
9080151cd5 [varLib] Fix variations for composite glyphs using anchor points 2016-07-29 14:44:02 -07:00
Behdad Esfahbod
fc05fe74ec [varLib] Remove unused code 2016-07-29 14:40:16 -07:00
Behdad Esfahbod
02b415c237 [bezierTools] Speed up a bit 2016-07-29 14:40:10 -07:00
Behdad Esfahbod
d201c2c28b Merge pull request #38 from googlei18n/one-last-optimization
One last optimization
2016-07-28 18:04:57 -07:00
Behdad Esfahbod
f899c8ccf8 Combine two more loops
Another 10% speedup.
2016-07-28 17:37:18 -07:00
Behdad Esfahbod
c5a17bb055 Shuffle code in cubic_approx_spline() a bit 2016-07-28 17:10:49 -07:00
Behdad Esfahbod
b305ef49be Another micro-optimization 2016-07-28 16:31:30 -07:00
Behdad Esfahbod
40ebe85d9e Move special-cases of split_cubic_into_n() into it
Surprisingly this doesn't seem to slow down, but also slightly
speed up.
2016-07-28 16:25:58 -07:00
Behdad Esfahbod
ede89847a7 Apply review changes from https://github.com/googlei18n/cu2qu/pull/37 2016-07-28 16:12:00 -07:00
Behdad Esfahbod
701105098b Merge pull request #37 from googlei18n/break-early
Break early
2016-07-28 16:10:13 -07:00
Behdad Esfahbod
223450e8d7 Break out of conversion loop early if a curve fails to convert
Makes the compatible-conversion about 40% faster.
2016-07-28 14:41:33 -07:00
Behdad Esfahbod
39fbd9faba [benchmark] Make output more compact
Also, are the min numbers really useful?
2016-07-28 14:41:33 -07:00
Behdad Esfahbod
54104319f9 Another theoretical optimization 2016-07-28 13:57:17 -07:00
Behdad Esfahbod
de9b9ba3e1 Reduce code duplication 2016-07-28 13:51:11 -07:00
Behdad Esfahbod
77c913ba61 Add keyword-argument hack for 2/3 as well 2016-07-28 13:44:41 -07:00
Behdad Esfahbod
d357503806 Merge pull request #36 from googlei18n/cleanup
Cleanup
2016-07-28 13:35:04 -07:00
James Godfrey-Kittle
d87bbe25fd Typo 2016-07-28 12:51:08 -07:00
James Godfrey-Kittle
c0b6ed92e3 Update/add some rudimentary comments 2016-07-28 12:32:29 -07:00
James Godfrey-Kittle
f7b9ebba06 Move error classes, dot function to top of file 2016-07-28 12:12:22 -07:00
James Godfrey-Kittle
5db64c55aa More vertical whitespace
Style guide says two blank lines between top level functions.
2016-07-28 12:09:52 -07:00
James Godfrey-Kittle
152baa88a5 No lines over 80 characters
This meant going back on my horizontal whitespace around operators
stance, but in this case I think it looks better to reduce whitespace
than to break up the line.
2016-07-28 12:07:44 -07:00
James Godfrey-Kittle
65befad036 Update some comments 2016-07-28 12:03:53 -07:00