8695 Commits

Author SHA1 Message Date
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
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
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
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
Cosimo Lupo
25b4dd57ea
Merge pull request #2200 from justvanrossum/fix-issue-2198
Revert ABC changes to Pens, fixes #2198
2021-02-26 19:38:08 +00:00
justvanrossum
2429a187fc Revert ABC changes to Pens, fixes #2198 2021-02-26 20:18:37 +01:00
Cosimo Lupo
4de2a4076b
Bump version: 4.21.0 → 4.21.1.dev0 2021-02-26 16:12:51 +00:00
Cosimo Lupo
a337752766
Release 4.21.0 2021-02-26 16:12:51 +00:00
Cosimo Lupo
6da59abba2
Update changelog [skip ci] 2021-02-26 16:10:53 +00:00
Simon Cozens
f49ad5a9ad
Merge pull request #2192 from simoncozens/beziertools-intersections
Add intersections and point-at-time functions to bezierTools
2021-02-26 15:59:05 +00:00
Simon Cozens
a775b6e19c Fix _aligment_transformation as suggested 2021-02-26 13:13:59 +00:00
Marc Foley
52b742fdc9
Merge pull request #2189 from fonttools/instancer-name
Instancer: update name table (take 2)
2021-02-26 10:55:39 +00:00
Marc Foley
52fec53d20
Drop nameID 25 if instantiating a static font 2021-02-26 10:32:38 +00:00
Marc Foley
a7913ef50e
Add test for Regular fallback 2021-02-26 10:32:38 +00:00
Cosimo Lupo
d1a8e1ee76
fall back to 'Regular' when no subFamilyName
assert we have some 'string' instead of silently continuing
2021-02-26 10:32:38 +00:00
Cosimo Lupo
0c92d33bc0
fix sub-string check in update uniqueID 2021-02-26 10:32:38 +00:00
Cosimo Lupo
fcfcb78cc0
make docstring shorter; fix _isRibbi
return True only if a corresponding english record is found and matches R/I/B/BI, else return False.
We don't really care if there are any other unrelated english records, we care about this specific one, whether it's RIBBI or not

minor
2021-02-26 10:32:21 +00:00
Marc Foley
fcc02826b4
Implement Cosimo feedback from previous pr 2021-02-26 10:31:53 +00:00
Cosimo Lupo
2be13d50ac
make instancer into a package dir and move all names-related funcs to submodule
move instancer tests to Tests/varLib/instancer directory

create instancer/__main__.py to make package executable
2021-02-26 10:31:30 +00:00
Marc Foley
0280eb36cc Parametrize updateNameTable tests 2021-02-26 10:19:43 +00:00
Marc Foley
336e7827e7 Implement Cosimo feedback 2021-02-26 10:19:43 +00:00
Marc Foley
daf6427b0b Implement Adobe ps naming for instantiated instances 2021-02-26 10:19:43 +00:00
Marc Foley
de38c9ce96 Tidy up variable name and run through black 2021-02-26 10:19:43 +00:00
Marc Foley
5eac886e5a Only create typographic subfamily name if there are nonRibbi tokens 2021-02-26 10:19:43 +00:00
Marc Foley
29e4ff987c instancer: implement Cosimo feedback 2021-02-26 10:19:43 +00:00
Marc Foley
bef1d08c0b instancer: updateNameTableStyleRecords use strings as input instead of axis values 2021-02-26 10:19:43 +00:00
Marc Foley
11f0ade44c cleanup _updateUniqueIdNameRecord 2021-02-26 10:19:43 +00:00
Marc Foley
0bcbbfdbb5 instancer: reuse existing instantiateSTAT func 2021-02-26 10:19:43 +00:00
Marc Foley
9a72311d19 instancer: refactor updateNameTable 2021-02-26 10:19:43 +00:00
Marc Foley
b328475072 wip instancer: update uniqueID 2021-02-26 10:19:43 +00:00
Marc Foley
ce1d8a9955 instancer: Add axisDefaults to axisLimits 2021-02-26 10:19:43 +00:00
Marc Foley
69c8667982 instancer: sort axisValues so format 4 are dominant for constructing names 2021-02-26 10:19:43 +00:00
Marc Foley
0b639c2979 instancer: use bit mask for axisValue flags 2021-02-26 10:19:43 +00:00
Marc Foley
b4b1ce3579 instancer: include attribute axisValues 2021-02-26 10:19:42 +00:00
Marc Foley
f89c01d2d7 instancer: only updateNames if axisValue with specified coord exists 2021-02-26 10:19:42 +00:00
Marc Foley
2fd934051b Refactor axisValuesFromAxisLimits 2021-02-26 10:19:42 +00:00
Marc Foley
78f6c2ae75 instancer: add test for partial instance name 2021-02-26 10:19:42 +00:00