5903 Commits

Author SHA1 Message Date
Behdad Esfahbod
3d2fa8a342 [glyf] Return component transform as part of control data
This makes sure that when we are building variable fonts, we
check that all masters have the same component transform in
composite glyphs.  We were not checking for this before.
2022-10-20 11:05:08 -06:00
Cosimo Lupo
6fd5bc270e
Merge pull request #2860 from fonttools/set-redundant-attrs
[otlLib|featureVars] sort name records after building STAT, set redundant Counts
2022-10-20 17:31:45 +01:00
Cosimo Lupo
c41cda33c1
featureVars: set FeatureCount/LangSysCount, even if 0 2022-10-20 16:45:44 +01:00
Cosimo Lupo
41ff9511cc
otlLib: sort names after building STAT, set AxisValueCount=0 2022-10-20 16:44:02 +01:00
Jany Belluz
1cb5ef57dd [designspaceLib] Allow non-zero Upright values in STAT entries 2022-10-19 10:44:36 +01:00
Jany Belluz
3577728a43 [designspaceLib] Fix check for Upright STAT entry 2022-10-19 09:58:15 +01:00
Jany Belluz
12d13f0b26 [designspaceLib] Fix recursion error with linkedUserValue in both directions 2022-10-18 17:32:14 +01: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
Behdad Esfahbod
4742960f7f [varLib.cff] Don't round deltas
Fixes https://github.com/fonttools/fonttools/issues/2838
2022-10-04 14:12:01 -06:00
Behdad Esfahbod
f19283e692 [scaleUpem] Handle CFF hintmask 2022-10-04 12:40:14 -06:00
Behdad Esfahbod
6b7c2767d7 [scaleUpeam] Calculate numShorts in VarData after scale
Part of https://github.com/fonttools/fonttools/issues/2840
2022-10-04 12:34:53 -06:00
Jany Belluz
1372a36485 Bump version: 4.37.4 → 4.37.5.dev0 2022-09-30 16:25:50 +01:00
Jany Belluz
67f759aa34 Release 4.37.4 2022-09-30 16:25:49 +01:00
Jack McCabe
eeba234ee0 [subset] PR feedback implementation 2022-09-30 15:59:11 +01:00
Jack McCabe
14ce08bd75 [subset] extend CPALv1 test 2022-09-30 15:41:14 +01:00
Jack McCabe
70112b947d [subset] prevent CPAL nameIDs from being dropped 2022-09-30 12:36:28 +01:00
Jack McCabe
b945fd6305 [subset] Fix enumeration of palette entry labels 2022-09-30 11:40:39 +01:00
Cosimo Lupo
ea534a4ecf
unicodedata: Update Scripts/Blocks to Unicode 15.0
by re-running the MetaTools/buildUCD.py script using the current UCD
database.
2022-09-23 10:42:55 +01:00
Just van Rossum
a2eef358be [instancer] Minor touch-up of #2828 2022-09-20 17:36:43 +02:00
Just van Rossum
c7ea667215 [intancer] Add stat.ElidedFallbackNameID to the set of used name IDs, to avoid it being pruned. Fixes #2822 2022-09-20 17:21:26 +02:00
Guillaume Ayoub
fd0e81ad13 Avoid negative hmtx values when creating font from variable font
Fix #2821.
2022-09-20 16:27:54 +02:00
Cosimo Lupo
810aeaa4d7
Bump version: 4.37.3 → 4.37.4.dev0 2022-09-20 11:00:17 +01:00
Cosimo Lupo
8bc00a64b8
Release 4.37.3 2022-09-20 11:00:15 +01:00
Just van Rossum
d0f4133df0 Fix arguments in calls to (glyf) glyph.draw() and glyph.drawPoints(); this fix also exposed a second bug, where lsb and tsb were not set; this fixes #2824 2022-09-20 09:00:35 +02:00
Cosimo Lupo
b9299532a1
Bump version: 4.37.2 → 4.37.3.dev0 2022-09-15 18:28:50 +01:00
Cosimo Lupo
1f9e6eb132
Release 4.37.2 2022-09-15 18:28:48 +01:00
Cosimo Lupo
276f6aaf44 [subset] keep and don't prune CPAL if OT-SVG table is present
Fixes #2814

or at least is a workaround until a proper 'fix'
2022-09-14 12:55:40 -06:00
Cosimo Lupo
87bbb64061
[instancer] downgrade GSUB/GPOS version if there are no FeatureVariations after instancing
same as https://github.com/fonttools/fonttools/pull/2811 but moved the logic to _instantiateFeatureVariations directly, instead of after it
2022-09-13 10:44:26 +01:00
Cosimo Lupo
25a05c72ab subset: add --no-lazy option to load font eagerly as TTFont(lazy=False) 2022-09-08 15:42:34 +01:00
Cosimo Lupo
e4b3394a38 [varLib] omit optional COLR.VarIndexMap for identity mapping
Fixes #2800
2022-09-05 17:18:29 +01:00
Simon Cozens
d48d858c2c
Speed up cache key construction in variableScalar (#2801) 2022-09-05 15:41:01 +01:00
Simon Cozens
64fd837ca1
Allow multiple value record types in the same pairpos table (#2776)
* Use buildPairPosClassesSubtable's ability to promote value records (see #2772)

* Add tests for #2772
2022-09-05 14:44:50 +01:00
Simon Cozens
5d5c16207b
Speed up varscalar with caching (#2798)
* Speed up varscalar with caching

* Don't use cached_property

* Make model pool a class attribute

* Don't catch things on the values side

* Remove unused import
2022-09-05 14:27:08 +01:00
Simon Cozens
17feda4608
Cythonize lexer (#2799) 2022-09-05 12:58:00 +01:00
Harry Dalton
2da2653837 Allow "minimum"/"maximum" keys to be missing, as well as None
Some areas of the library check for both representations, and so doing
this here too means we are less likely to break existing code.

Despite this, flexibility introduces ambiguity, and so if typing gives
us confidence that such an input is unlikely, we could re-review this;
conditions with missing keys are not safe to use across the entire code-
base.
2022-09-01 17:21:04 +01:00
Harry Dalton
fef9e9a071 Fix handling of unbounded conditions
For unbounded conditions, the previous code expects "minimum" or
"maximum" to be entirely absent, whereas actually they will be
consistently present with one having a value of None.

This means that math.inf and -math.inf are never substituted in for the
absent bound, and a crash occurs when the None value propagates.

This commit corrects the behaviour by checking for a value of None,
instead of checking for the presence of the keys, bringing the
behaviour inline with the rest of the library.
2022-09-01 13:49:58 +01:00
Miguel Sousa
1306a71db3
Merge pull request #2786 from fonttools/msousa-bad-post-format-1
Don't crash when `post` format 1 is improperly used
2022-08-31 08:52:49 -07:00
Miguel Sousa
96c9250cf8 Update warning message [skip ci] 2022-08-31 08:52:17 -07:00