Behdad Esfahbod
cb031514ea
[varLib.avar] Try dropping unnecessary "masters"
...
Untested, as I don't have a test font that exercises this.
2024-08-30 08:46:50 -07:00
Behdad Esfahbod
0c2652011e
[varLib.models] By default, assume OpenType-like normalized space
...
See:
https://github.com/fonttools/fonttools/pull/2846#issuecomment-2267750076
I *think* this is an improvement, and no one should have been relying
on the broken existing behavior.
Docs need updating.
2024-08-16 18:45:08 -06:00
Behdad Esfahbod
9f66edb0d1
[varLib.models] Add validate=False to normalizeLocation
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
42a5fbdfdd
[VARC] Redesign table
...
No spec yet. For results see:
https://github.com/harfbuzz/boring-expansion-spec/issues/103#issuecomment-1863533305
2024-05-22 18:46:06 -06:00
Behdad Esfahbod
36e2c6dcd3
[varLib.models] Simplify based on review
2023-12-12 04:39:05 -07:00
Behdad Esfahbod
86b2bf62e6
[varLib.models] Change interpolateFromMasters implementation
2023-12-11 18:55:54 -07:00
Behdad Esfahbod
381b55b936
[varLib.models] Refactor common logic
2023-12-11 18:54:16 -07:00
Behdad Esfahbod
5a5898c824
[varLib.models] Add interpolateFromMastersAndMasterScalars()
...
Faster than the alternative way to calculate them.
2023-12-10 17:15:42 -07:00
Behdad Esfahbod
ae69c22df8
[varLib.models] Document a bit
2023-12-07 13:01:48 -07:00
Behdad Esfahbod
e98cec3264
[varLib.models] Simplify getMasterScalars
...
https://github.com/fonttools/fonttools/pull/3380#issuecomment-1845983903
2023-12-07 12:52:51 -07:00
Behdad Esfahbod
85883f09bc
[varLib.models] Add getMasterScalars
2023-12-07 12:29:00 -07:00
Behdad Esfahbod
64279c3d85
[varLib.models] Export piecewiseLinearMap()
2023-11-14 09:21:11 -07:00
Cosimo Lupo
335a1e56ec
re-run black v23.10 on all .py files
2023-11-03 10:25:15 +00:00
Rod S
2f1f5e5e7b
Odd check pattern
2023-01-26 14:35:55 -07:00
Nikolaus Waxweiler
d584daa8fd
Blacken code
2022-12-13 11:26:36 +00:00
Cosimo Lupo
040fdb03a0
Rework assertion per feedback
2022-10-13 19:17:33 +01:00
Cosimo Lupo
3c935f95ca
normalizeLocation: fix ZeroDivisionErrors with extrapolate=True
...
these happens when v < default and default==lower, or when v > default but default==upper...
2022-10-13 18:39:56 +01:00
Cosimo Lupo
f66ee05f71
Merge pull request #2847 from fonttools/extrapolate-normalize
...
Allow extrapolation in normalization
2022-10-13 16:25:42 +01:00
Simon Cozens
4d21550052
Allow extrapolation in normalization
2022-10-13 12:34:59 +01:00
Just van Rossum
668b8d094b
Fallback should be value, not 0
2022-10-13 12:54:19 +02:00
Just van Rossum
a91e4d3595
An omitted axis in a location implies a value of 0 -- we need to records that value
2022-10-13 12:48:59 +02:00
Just van Rossum
b073fb8f6f
Demand axisRanges is given when extrapolate is True
2022-10-13 12:27:46 +02:00
Just van Rossum
e02e9dc295
Drop -1,+1 fallback and require the axisRanges dict to be complete
2022-10-13 09:07:59 +02:00
Just van Rossum
8e527d3b84
adjust doctests and doc strings
2022-10-13 08:54:28 +02:00
Just van Rossum
4ef44bfbd1
formatting
2022-10-13 08:42:37 +02:00
Just van Rossum
053cba3626
use value as default instead of 0
2022-10-12 16:48:13 +02:00
Just van Rossum
115874cb05
Always ssign axisValues attr
2022-10-12 16:41:50 +02:00
Just van Rossum
f368dcb4dd
Attempt to fix #2843 by computing the axis ranges for interpolation
2022-10-12 16:29:14 +02:00
Cosimo Lupo
f5933c1cfa
Revert "[varLib.models] Generate narrower tents"
...
This reverts commit 688939394b8cae3b2a0d5747e435cbd828a14531.
2022-08-23 17:20:57 +01:00
Behdad Esfahbod
5284ac3c58
[varLib.models] Update docstring
2022-08-23 09:56:33 -06:00
Behdad Esfahbod
bad70c68ef
[varLib] Support extrapolation
...
Fixes https://github.com/fonttools/fonttools/issues/1252
2022-08-23 09:56:33 -06:00
Behdad Esfahbod
fce82adba2
[varLib] Clean up __all__
2022-08-22 11:59:04 -06:00
Behdad Esfahbod
129e9cf6a5
[varLib] Fix doc formatting
2022-08-22 07:43:48 -06:00
Behdad Esfahbod
688939394b
[varLib.models] Generate narrower tents
...
Based on https://github.com/fonttools/fonttools/pull/2218
but modify the general solver instead.
2022-08-14 14:00:09 -06:00
Simon Cozens
0f03e6529a
[docs] Fix sphinx warnings ( #2453 )
...
* Add default auto doc options
* Ensure all references are unique
* Use anonymous links to avoid duplicate references
* Remove default options, fix wrong module name
* Don’t index repeated class
* Remove repeated classes included through automodule
* Fix warnings
* We don’t use our own static directory
* Correctly format XML in docs
* Fix indentation
* Fix overline
* Bring TOC to top
* Fix definition list
* Offset definition lists and examples
* Fix erroneous markup
* Fix markup
* Already included in automodule
* Fix args markup
* Correct markup for example
* Don’t reindex repeated module
* Correct XML code block markup
* Fix markup errors, change example to doctest
* Correct list markup
* Make ttx docstring both valid RST and valid help output
* Various other boring markup fixes
* Fix example indenting
* Make docstring valid RST and valid help output
* Mock import for reportlab
* It’s ok if manual links don’t appear in toctrees
* Oops typo, I guess doctests are useful
2021-12-02 15:31:49 +00:00
Simon Cozens
b41b062402
We are iterating over supports, not locations, here
2021-05-12 16:13:58 +01:00
Simon Cozens
2aa1a6ddf6
Remove else-after-return
2021-05-12 15:04:41 +01:00
Simon Cozens
5ac809410f
Reformat with black
2021-05-12 15:02:59 +01:00
Simon Cozens
1526b9e024
Another unused enumeration
2021-05-12 15:01:18 +01:00
Simon Cozens
f711b65475
Index was never used
2021-05-12 14:57:20 +01:00
Simon Cozens
1c509f931d
Avoid unnecessary intermediary variables
2021-05-12 14:56:44 +01:00
Simon Cozens
ab328b5ecc
axisPoints is not used outside the sort function
2021-05-12 14:55:14 +01:00
Behdad Esfahbod
96690de9a9
[varLib] Optimize out multiplication by 1 when computing deltas
2021-04-08 09:41:45 -06: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
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
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
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
Cosimo Lupo
81d0042a9e
varLib.models: fix argument name in main()
2020-08-12 09:41:46 +01:00