516 Commits

Author SHA1 Message Date
Chris Simpkins
3e252d8c87
[py23] change deprecation warning from "next release" to "future release" 2021-03-20 11:52:12 -04: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
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
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
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
Simon Cozens
a775b6e19c Fix _aligment_transformation as suggested 2021-02-26 13:13:59 +00:00
Simon Cozens
60c1ee0107 Black whole module 2021-02-26 10:03:37 +00:00
Simon Cozens
1a3478da0e Fixes from review 2021-02-26 10:03:32 +00:00
Simon Cozens
2ef7964e90 If we swapped the segments, we must swap them back when returning results 2021-02-18 22:12:20 +00:00
Simon Cozens
1795ee98b2 Address various feedback 2021-02-18 14:54:27 +00:00
Simon Cozens
fdceeee0c6 Unnecessary parens 2021-02-18 11:39:46 +00:00
Simon Cozens
c082616c6f Make hacky uniquifying thing more explicit 2021-02-18 11:39:36 +00:00
Simon Cozens
80a3227f44 Raise error in unknown curve degrees 2021-02-18 11:39:01 +00:00
Simon Cozens
6a223e5f93 Rename parameters 2021-02-18 11:38:40 +00:00
Simon Cozens
2e211194c8 No harm in handling all segment types here 2021-02-18 11:23:24 +00:00
Simon Cozens
c17b1c9e9f Oops, this has a different interface to the curve-based ones 2021-02-18 11:20:45 +00:00
Simon Cozens
01957a9b94 Intersection and point-at-time functions from beziers.py 2021-02-18 10:49:52 +00:00
Simon Cozens
8e42f693a7 Add function to compute bounding box area 2021-02-18 10:48:09 +00:00
justvanrossum
f416a5cb17 fix Vector division 2021-02-03 20:24:04 +01:00
Cosimo Lupo
822d3bf261
plistlib: remove unused 'type: ignore' comment to appease mypy 2021-01-25 17:42:19 +00:00
justvanrossum
186032cb10 fixed formatting 2020-11-09 15:39:21 +01:00
Nikolaus Waxweiler
0742a9bff3 Implement suggestions 2020-09-21 17:01:22 +01:00
Nikolaus Waxweiler
a1df979335
Update Lib/fontTools/misc/plistlib/__init__.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2020-09-21 16:53:55 +01:00
Nikolaus Waxweiler
4efc06e62f
Update Lib/fontTools/misc/plistlib/__init__.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2020-09-21 16:53:46 +01:00
Nikolaus Waxweiler
2906ac2908 One less type-ignore 2020-09-16 20:28:33 +01:00
Nikolaus Waxweiler
09a64418f0 Misplaced ignore 2020-09-16 20:08:45 +01:00
Nikolaus Waxweiler
a501c0cbe7 More typing and ignores 2020-09-16 19:59:50 +01:00
Nikolaus Waxweiler
10864be26f Fix one typing warning 2020-09-16 17:42:46 +01:00
Nikolaus Waxweiler
863d9fd3c8 Add py.typed file 2020-09-16 12:03:52 +01:00
Nikolaus Waxweiler
e1c9710272 More types, correct stale comment 2020-09-16 09:52:46 +01:00
Nikolaus Waxweiler
fa32cf2fed Remove unused type comment 2020-09-16 09:31:05 +01:00
Nikolaus Waxweiler
a364cff13f No need for _D anymore 2020-09-15 23:58:23 +01:00
Nikolaus Waxweiler
be77335993 Remove unused typing imports 2020-09-15 23:31:03 +01:00
Nikolaus Waxweiler
8a5baa0aa6 Return Any from load*
https://github.com/python/typeshed/pull/4543
2020-09-15 23:27:39 +01:00
Nikolaus Waxweiler
d70ca8224e More typing 2020-09-15 18:31:07 +01:00
Nikolaus Waxweiler
4f51a5da10 More typing 2020-09-15 17:20:03 +01:00
Nikolaus Waxweiler
9d13fe1150 Simplify typing for singledispatch 2020-09-15 15:01:53 +01:00
Nikolaus Waxweiler
bbfc7b9ff5 Fix type mixup 2020-09-15 14:27:22 +01:00
Nikolaus Waxweiler
ff0e0028f4 Use overload instead of exploding singledispatch 2020-09-15 13:00:36 +01:00
Nikolaus Waxweiler
7c02ab3d3c woopsie 2020-09-15 00:02:54 +01:00
Nikolaus Waxweiler
80b8b1556c WIP: add typing info to plistlib 2020-09-14 23:45:21 +01:00
Simon Cozens
18a978bd3d Remove MacOS module references. Fixes #1978. 2020-07-07 09:08:10 +01:00
Simon Cozens
775dc6074e
fontTools.misc.* documentation, part 2 (#1981)
* Document misc.filenames
* Document misc.fixedTools
* Document misc.intTools
* Document misc.loggingTools
* Document misc.macCreatorType
* Document misc.macRes
* Document misc.plistlib
2020-06-08 15:53:48 +01:00
Simon Cozens
76902b7129
[docs] fontTools.misc.* part 1 (#1956)
* Document misc.arrayTools
* Document misc.bezierTools
* Document cliTools
* Document eexec
2020-05-19 09:51:17 +01:00
Cosimo Lupo
b81d13952a
Merge pull request #1932 from simoncozens/pscharstring-repeated-init
[misc.psCharStrings] Use inheritance to avoid repeated code in initializer
2020-05-11 11:15:54 +01:00
Simon Cozens
b69052de47 [misc.psCharStrings] Use inheritance to avoid repeated code in initializer 2020-05-07 21:21:40 +01:00