12176 Commits

Author SHA1 Message Date
Cosimo Lupo
1787cf63cf Release 4.56.0 2025-02-07 13:15:55 +00:00
Cosimo Lupo
79769a2682 Update NEWS.rst 2025-02-07 13:15:24 +00:00
Cosimo Lupo
b94f17ed6c
Merge pull request #3767 from fonttools/simplify-varstore-optimizer
[varStore] use the same sorting for both input/output
2025-02-07 11:16:26 +00:00
Cosimo Lupo
0068f78b9a varStore_test: shuffle input order to test algorithm is stable 2025-02-07 11:06:57 +00:00
Cosimo Lupo
d4565155b8 [varStore] remove unused _Encoding methods 2025-02-06 19:11:30 +00:00
Cosimo Lupo
548ffda37b [varStore] use the same sorting for both input/output
When the VarStore.optimize() algorithm was improved with the addition of a priority queue where pairs of encodings are sorted by decreasing gain (from merging one into the other), specifically with this commit https://github.com/fonttools/fonttools/commit/47ec18f788, the pre-sorting step of the todo list (before the queue itself was populated) was kept to make sure the algorithm produces stable results no matter the order of the inputs.
The optimizer's output was itself sorted, again for stability, but using a different key function with_sort_key() from the one used on the input todo list gain_sort_key().
The rationale for a distinct gain_sort_key, where encodings get sorted by maximum theoretical gain (decreasing, initally, when reverse=True was set, then incrasing as reverse was somehow dropped), is no longer needed now that a priority queue is used (which sorts by actual gains from merging specific pairs of encodings) and is a remnant of the previous algorithm.

I propose we keep some pre-sorting to ensure stability (in case the priority queue initially contains multiple pairs with the same gain), but we use the same width_sort_key that is used at the end.

Note this doesn't change the overall level of compression achieved by the optimizer, but makes the algorithm a bit less complicated, and easier to match in our alternative Rust implementation.
2025-02-06 19:01:38 +00:00
Cosimo Lupo
307b31250d
Merge pull request #3758 from fonttools/DeltaValue
[otData] Fix DeltaValue repeat value
2025-02-04 10:44:17 +00:00
Cosimo Lupo
5b3176f4fd add test for parsing and compiling DeviceTable's DeltaValue 2025-02-04 10:37:27 +00:00
Cosimo Lupo
520c9830c2
Merge pull request #3763 from fonttools/fix-mp-fealib
[feaLib] Make FeatureLibError pickleable (#3762)
2025-02-03 17:09:54 +00:00
Jens Kutilek
264b7ca985 Make FeatureLibError pickleable (#3762) 2025-02-03 17:48:21 +01:00
Cosimo Lupo
696719ba27
Merge pull request #1788 from fonttools/remove-gvar-zero-workaround
Remove workaround (#1381)
2025-02-03 12:44:05 +00:00
Jens Kutilek
2e13c733c8 Remove unneeded check, adjust tests 2025-02-03 12:23:10 +00:00
Jens Kutilek
7f8f711dda Remove workaround (#1381) 2025-02-03 12:21:21 +00:00
Behdad Esfahbod
24eb3f7197 [otData] Fix DeltaValue repeat value
The "" marker is used when a custom converter expects a list.
For DeltaValues, we expect a list as a single value, not a list
to be enumerated in XML. So, None is appropriate here. Cryptic,
I know...

Fixes https://github.com/fonttools/fonttools/pull/3757
2025-01-30 13:52:03 +00:00
خالد حسني (Khaled Hosny)
b467579c8d
Merge pull request #3720 from n8willis/ttLib
[Docs] ttLib: higher-level navigation and helper documentation
2025-01-29 23:23:17 +02:00
خالد حسني (Khaled Hosny)
13eed1dd48
Merge pull request #3755 from fonttools/dependabot/github_actions/pypa/gh-action-pypi-publish-1.12.4
Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4
2025-01-29 23:22:25 +02:00
Cosimo Lupo
8a89f4f81b Bump version: 4.55.8 → 4.55.9.dev0 2025-01-29 18:01:37 +00:00
Cosimo Lupo
aef6d28737 Release 4.55.8 2025-01-29 18:01:36 +00:00
Cosimo Lupo
ffb8d93406 Update NEWS.rst 2025-01-29 18:01:32 +00:00
Cosimo Lupo
4957cd7aba buildUCD.py: minor refactorings, remove py2-isms 2025-01-29 17:48:00 +00:00
Cosimo Lupo
eece3c1b62
Merge pull request #3756 from cmyr/unicode-data-fixup
[unicodedata] Fix bug in buildUCD.py
2025-01-29 17:35:33 +00:00
Colin Rofls
b26271cc4d [unicodedata] Fix bug in buildUCD.py
The method that was being used to read the header from the input was
inadvertently dropping the first non-header line on the floor; although
this happens to be okay in some cases (where there is an empty line
after the header) in the case of newer versions of the
ScriptExtensions.txt file, this was causing the generated code to be
missing the first entry, for U+00B7 (MIDDLE DOT)
2025-01-29 11:53:58 -05:00
Cosimo Lupo
b7509b24a9 Bump version: 4.55.7 → 4.55.8.dev0 2025-01-28 12:04:09 +00:00
Cosimo Lupo
336299e390 Release 4.55.7 2025-01-28 12:04:09 +00:00
Cosimo Lupo
86a959fb35 Update NEWS.rst [skip ci] 2025-01-28 12:03:55 +00:00
dependabot[bot]
e078d1d740
Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.3 to 1.12.4.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.3...v1.12.4)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 20:01:01 +00:00
Cosimo Lupo
41c86719a8 shorten the changelog included in package description
Fixes #3754

Previously we were appending the entire NEWS.rst to the README.rst to make up the PyPI package description. Now we trim the changelog up to some arbitrary `.. package description limit` and insert a link that points to the full NEWS.rst on Github. I set it to just before 4.0 release which is 5 years ago, about half the total number of lines of the full NEWS.rst, so we should be good for a few years at least.
2025-01-27 11:07:15 +00:00
Cosimo Lupo
42db704693 Bump version: 4.55.6 → 4.55.7.dev0 2025-01-24 18:59:56 +00:00
Cosimo Lupo
db0b499558 Release 4.55.6 2025-01-24 18:59:56 +00:00
Cosimo Lupo
602ee925f0 Update NEWS.rst 2025-01-24 18:59:45 +00:00
Cosimo Lupo
cdf5a6e69b [ci] try use Github-hosted linux arm64 runners instead of docker+qemu
this should just work now
https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

Fixes https://github.com/fonttools/fonttools/issues/3753
2025-01-24 18:18:17 +00:00
Cosimo Lupo
d822fefa62
Merge pull request #3752 from fonttools/nested-components-bounds
[recalcBounds] fix rounding of bbox for nested transformed components
2025-01-24 18:12:04 +00:00
Cosimo Lupo
bddedc1bc1 restrict the rounding to where strictly needed
we don't need to round all simple glyphs' coordinates (which may be costly), only when these are used as components with an interesting transform
2025-01-24 18:05:18 +00:00
Cosimo Lupo
4ea10eb88f [glyf] fix rounding of bbox for nested transformed components
when getCoordinates is asked to round, e.g. from recalcBounds, only round the simple glyphs' coordinates; don't do any rounding for the coordinates of component glyphs otherwise rounding errors would accummulate if a composite glyph contains transformed/nested components
2025-01-24 15:10:18 +00:00
Cosimo Lupo
e02349c7ce [ttGlyphPen_test] Add bounds test for 'nested' composite glyph
This is a regression introduced with https://github.com/fonttools/fonttools/pull/3750

The test currently fails because we are now applying rounding to the
coordinates extracted from each component of a composite glyph, *before*
these are transformed; with nested components of components with non trivial transforms, the rounding errors compound leading to incorrect bounds.
2025-01-24 15:04:42 +00:00
Cosimo Lupo
48a4b76332 Reapply "Bump version: 4.55.5 → 4.55.6.dev0"
This reverts commit b1ba6870af7812fa5e92e72b703dd4a06f098092.
2025-01-23 12:21:31 +00:00
Cosimo Lupo
b1ba6870af Revert "Bump version: 4.55.5 → 4.55.6.dev0"
This reverts commit 00b7bb958fb85244f09b347ce33a031d3a571b59.
2025-01-23 12:19:47 +00:00
Cosimo Lupo
8abe2ae2b7 [ci] attempt to fix gcc segfaults under aarch64 docker/qemu 2025-01-23 12:16:14 +00:00
Cosimo Lupo
00b7bb958f Bump version: 4.55.5 → 4.55.6.dev0 2025-01-23 11:31:13 +00:00
Cosimo Lupo
dcf0d5abb2 Release 4.55.5 2025-01-23 11:31:13 +00:00
Cosimo Lupo
bbdad2a93e Update NEWS.rst 2025-01-23 11:31:07 +00:00
Cosimo Lupo
cf20a14453
Merge pull request #3750 from fonttools/recalcBounds-round-coords
[glyf] fix bbox of transformed components with un-rounded coordinates
2025-01-23 11:26:50 +00:00
Cosimo Lupo
ec5d41929f [glyf] fix recalcBounds of transformed components with unrounded coordinates
Fixes https://github.com/googlefonts/fontc/issues/1206
2025-01-23 11:19:30 +00:00
Cosimo Lupo
6ea7f5e2a6 [ttGlyphPen_test] add repro for googlefonts/fontc#1206
the test makes sure that the bounding box of composite glyph with non trivial transform pointing to base glyphs with un-rounded floating-point coordinates, still get their bounding box computed on the rounded-off integer coordinates.

see https://github.com/googlefonts/fontc/issues/1206
2025-01-23 11:06:28 +00:00
Cosimo Lupo
098b749536
Merge pull request #3749 from cmyr/fea-duplicate-language-stmt
[feaLib] Allow duplicate script/language statements
2025-01-23 10:21:56 +00:00
Colin Rofls
6bc5d7f887 [feaLib] Allow duplicate script/language statements
And accumulate all of the declared lookups into the appropriate feature.
2025-01-22 12:58:44 -05:00
Cosimo Lupo
46cb2d078a Bump version: 4.55.4 → 4.55.5.dev0 2025-01-21 15:06:25 +00:00
Cosimo Lupo
7222152a41 Release 4.55.4 2025-01-21 15:06:25 +00:00
Cosimo Lupo
294e32651b Update NEWS.rst 2025-01-21 15:05:58 +00:00
Cosimo Lupo
70fb77884c
Merge pull request #3719 from fonttools/statisticsControlPen-fix
[StatisticsControlPen] Fix uninitialized variable
2025-01-21 14:03:04 +00:00