8728 Commits

Author SHA1 Message Date
Simon Cozens
8a6e3087ce Use pytest exception handling 2021-03-17 11:55:51 +00:00
Simon Cozens
539b3cd71d Special case must actually be special-cased 2021-03-17 11:52:50 +00:00
Simon Cozens
939962f858 Check we can actually get a name 2021-03-17 11:52:35 +00:00
Simon Cozens
0a1aa19c39 Test for better error message 2021-03-15 13:12:11 +00:00
Simon Cozens
1bf3cccead Provide additional information for a common failure 2021-03-15 12:51:02 +00:00
Simon Cozens
46bd7a7e97 Many fixes... 2021-03-15 12:50:47 +00:00
Simon Cozens
5bac84374b Ensure TTF list is correct 2021-03-15 12:50:07 +00:00
Simon Cozens
e2a859d649 Ensure table name is in error message stack 2021-03-15 12:04:36 +00:00
Simon Cozens
7fc2e37e41 Try harder to get a name from file being merged 2021-03-15 12:00:31 +00:00
Simon Cozens
4cdf3312a5
Merge pull request #2223 from simoncozens/better-merge-errors
Explain merge errors in designer-friendly terms
2021-03-15 06:27:54 +00:00
Simon Cozens
1abfbb6cc7 Explain merge errors in designer-friendly terms 2021-03-13 22:30:27 +00:00
Cosimo Lupo
882d09ca8e
instancer: log.warn is deprecated 2021-03-11 18:24:23 +00:00
Cosimo Lupo
d80779d71e
py23_test: remove py27 test always skipped now 2021-03-11 18:23:26 +00:00
Cosimo Lupo
d89b3fbea6
Merge pull request #2216 from fonttools/jh-disambiguate-varlib-merge-errors
[varlib] disambiguate cff merge errors
2021-03-11 10:51:38 +00:00
Josh Hadley
50fb04fd57 [varlib] use VarLibCFFHintTypeMergeError for hint merging 2021-03-05 08:50:43 -08:00
Josh Hadley
aafc814088 [varlib] Add VarLibCFFHintTypeMergeError 2021-03-05 08:47:33 -08:00
Behdad Esfahbod
062b7c434e
Merge pull request #2214 from fonttools/varLib-round
[varLib] Move rounding to VariationModel, to avoid error accumulation from multiple deltas
2021-03-04 16:40:40 -07:00
Behdad Esfahbod
8b52b107c1
Merge pull request #2208 from simoncozens/refactor-variationmodel
Refactor VariationModel
2021-03-04 13:44:13 -07:00
Behdad Esfahbod
ed6164a44f [varLib.cff] Round deltas using bankers round as well
See https://github.com/fonttools/fonttools/pull/2214#issuecomment-790742479

Good news: this reverted the one CFF test that needed its expectation to
change when I started this patchset. Bad news: it introduced a couple other
diffs to the same glyph of the same test, which is consistent with changing
the rounding from otRound to round3.
2021-03-04 13:10:01 -07:00
Behdad Esfahbod
d56b844142 [varLib] Round outline deltas using banker's round as well
See https://github.com/fonttools/fonttools/pull/2214#issuecomment-790742479
2021-03-04 13:00:04 -07:00
Just van Rossum
6a8821d91c
Revert "Use Vector in some places where it improves the clarity of the code" (#2215)
* Revert most of "Use Vector in some places where it improves the clarity of the code (#2206)"

This reverts most of commit 0d3ce2cafc6f604fc46d4d3bfbab34a5bc59e27b.
2021-03-04 20:15:24 +01:00
Behdad Esfahbod
07a7dd3eb5 [varLib] Make newly-added round arguments keyword-only
So they are not accidentally set, only intentionally. Keeps positional-args
open for more direct uses.
2021-03-04 09:44:34 -07:00
Behdad Esfahbod
f5ef0b517b [varLib] Round most deltas using bankers' round, not otRound
See https://github.com/fonttools/fonttools/pull/2214#issuecomment-790742479
2021-03-04 09:43:26 -07:00
Behdad Esfahbod
606b072f40 [glyf] Add round=otRound parameter to GlyphCoordinates.toInt() & __round__() 2021-03-04 09:43:08 -07:00
Behdad Esfahbod
68004b8fec [varLib] Shift most (all?) delta-rounding to VarModel
Reduces error.

The main varfont-builder now asks the model to do rounding, and asks
VariationStore to do no rounding, so we don't spend extra times rounding
multiple times (specially with the heavy otRound).

I *think* I got it all and right...

Fixes https://github.com/fonttools/fonttools/issues/2213
2021-03-04 09:20:43 -07:00
Behdad Esfahbod
77acdbced3 [glyf] Remove stale comment about Python 2 2021-03-04 09:20:43 -07:00
Behdad Esfahbod
fdd8267065 [varLib.models] Add optional rounding to VariationModel() relevant methods
Users to be updated to benefit.

Part of https://github.com/fonttools/fonttools/issues/2213
2021-03-04 09:20:43 -07:00
Behdad Esfahbod
3a9a2bd4b1 [misc.roundTools] Add noRound(), maybeRound(), and roundFunc()
Moving out of CFF code, to be used in VariationModel().

Part of https://github.com/fonttools/fonttools/issues/2213
2021-03-04 09:20:43 -07:00
Behdad Esfahbod
abc1ba07a4 [misc.roundTools] New module; move otRound() here
Code relying on old place (fixedTools.otRound) still works.
2021-03-04 09:20:43 -07:00
Just van Rossum
0d3ce2cafc
Use Vector in some places where it improves the clarity of the code (#2206)
* Use Vector in some places where it improves the clarity of the code

* add __all__ to vector.py

* turned some list comprehensions into generator expressions: there's no need for an intermediate list in these cases

* Add empty __slots__ to Vector, so we don't waste space on a __dict__.

* add some tests for segmentPointAtT
2021-03-04 15:32:45 +01:00
Cosimo Lupo
e41c3b8b08
Merge pull request #2212 from fonttools/mutator-trivial-fixes
Mutator trivial fixes
2021-03-04 10:51:28 +00:00
Cosimo Lupo
53b13263e9
Merge remote-tracking branch 'origin/main' into mutator-trivial-fixes 2021-03-04 10:49:49 +00:00
Behdad Esfahbod
ed77aeaebf [cff] Speed-up rounding
We can choose specific round function based on tolerance once,
instead of choosing every time a number is being rounded.
2021-03-03 18:32:30 -07:00
Behdad Esfahbod
28fae1d95f [cff] Simplify rounding logic
No semantic change. Just refactoring and simplification in anticipation
of coming changes.
2021-03-03 18:27:06 -07:00
Behdad Esfahbod
ff46e2838f [varLib.plot] Reorder imports to make missing library easier to detect
$ pip install matplotlib
2021-03-03 16:25:35 -07:00
Simon Cozens
8b568640c0
Merge pull request #2209 from simoncozens/document-varlib-terminology
Add definitions for varLib-specific terms
2021-03-03 13:50:13 +00:00
Simon Cozens
a0d6ca3b76 ReStructuredText nits 2021-03-03 13:33:58 +00:00
Simon Cozens
516d0f7dfe Add definitions for varLib-specific terms 2021-03-03 12:57:52 +00:00
Simon Cozens
4dd83e0d55 Make terminology consistent 2021-03-03 12:57:12 +00:00
Simon Cozens
e9b35d0318 Split off box-splitting/support code to separate function 2021-03-03 10:33:50 +00:00
Simon Cozens
8c8522560a Separate computing delta weights 2021-03-03 10:23:28 +00:00
Just van Rossum
07a5e2de62
Merge pull request #2201 from justvanrossum/revamp-vector
[misc.arrayTools] move Vector to its own submodule, and rewrite as a tuple subclass
2021-03-02 10:11:33 +01:00
Behdad Esfahbod
dec5bb554f [varLib.instancer] Grammar 2021-03-01 12:02:06 -07:00
Behdad Esfahbod
a93ced044f [varLib.mutator] Simplify maxp handling 2021-02-28 18:19:24 -07:00
Behdad Esfahbod
23e5d4eb0b [varLib.mutator] Fix typo: maxInstructionDefs -> maxStackElements 2021-02-28 18:16:23 -07:00
justvanrossum
9c9ab5ac3a removed info-less doc string 2021-02-27 20:05:53 +01:00
justvanrossum
44b7560fe5 move Vector to its own submodule, and rewrite as a tuple subclass 2021-02-27 19:54:53 +01:00
Cosimo Lupo
825b5044fe
Bump version: 4.21.1 → 4.21.2.dev0 2021-02-26 19:41:15 +00:00
Cosimo Lupo
cfd87d7ba7
Release 4.21.1 2021-02-26 19:41:14 +00:00
Cosimo Lupo
a33df754f3
Update changelog [skip ci] 2021-02-26 19:41:05 +00:00