Cosimo Lupo
1ca554332c
_getCoordinatesAndControls: make sure coords are rounded toInt() as gvar expects
...
ufo2ft will no longer send varLib already-rounded master glyf tables (to give it an opportunity to compute implied oncurves on the pre-rounded coords) so when retrieving coordinates off the glyf table in order to compute gvar deltas we have to round
2023-06-07 18:05:48 +01:00
Cosimo Lupo
97e626b23e
ttGlyphPen: drop implied before rounding, allow not to round at all
...
We want to be able to compute implied oncurves both before coordinates have been rounded to integer and afterwards.
Also when ufo2ft builds interpolatable master TTFs, we want to turn off the rounding so that varLib can call dropImpliedOnCurvePoints on the un-rounded coordinates, so we need an option to disable rounding the coordinates in the ttGlyphPens
2023-06-07 17:55:56 +01:00
Cosimo Lupo
f7ca9f28ac
vector: add isclose method to compare vs another Vector using math.isclose
2023-06-07 17:50:33 +01:00
Cosimo Lupo
66ce7c0e0c
Merge pull request #3155 from fonttools/fix-drop-implied-oncurves
...
fix a bug in dropImpliedOnCurvePoints
2023-06-06 18:02:11 +01:00
Cosimo Lupo
0761508510
must update start = last + 1 in dropImpliedOnCurvePoints
...
Fixes #3155
2023-06-06 17:01:40 +01:00
Cosimo Lupo
4298c28e3c
add 2nd test contour to expose bug in dropImpliedOnCurvePoints
...
there's a bug whereby we don't correctly drop impliable oncurve if it occurs on the first point of the second contour.. because we forgot to update the contour start = last + 1...
2023-06-06 17:00:16 +01:00
Behdad Esfahbod
65598197c8
[subset] Remove quotation marks from command-line samples
...
Those have confused Windows users before.
Fixes https://github.com/fonttools/fonttools/issues/3149
2023-06-05 09:42:17 -06:00
Cosimo Lupo
d673fad56b
Merge pull request #3147 from fonttools/varlib-drop-implied-oncurves
...
[varlib] add --drop-implied-oncurves option
2023-06-05 12:28:51 +01:00
Cosimo Lupo
5b93100616
also check endPtsOfContours in dropImpliedOnCurvePoints
...
as per review https://github.com/fonttools/fonttools/pull/3147#discussion_r1214708207
Also, don't do same work multiple times when dropping points from flags/endPtsOfContours arrays since these are supposed to be the same for all interpolatable glyphs
2023-06-05 12:11:17 +01:00
Cosimo Lupo
0690703b86
varLib: add --drop-implied-oncurves option
...
For the test, I used the Tests/varLib/data/Build.designspace as starting point, modified the 'a' glyph so that 1 on-curve point (the first one) becomes impliable for all the masters.
2023-06-02 15:50:32 +01:00
Cosimo Lupo
b6bb9dfef0
ttGlyphPen: only call dropImpliedOnCurvePoints for simple glyphs after fully formed
2023-06-02 13:53:00 +01:00
Cosimo Lupo
6a276d9f6a
dropImpliedOnCurvePoints: raise if incompatible, skip empty/composites
2023-06-02 13:51:28 +01:00
Cosimo Lupo
84cebca6a1
Merge pull request #3146 from fonttools/drop-implied-oncurves-interpolatable
...
implied oncurve points for interpolatable glyphs
2023-06-01 20:55:57 +01:00
Cosimo Lupo
a039e1dda8
_g_l_y_f_test: add tests for dropImpliedOnCurvePoints
2023-06-01 19:27:32 +01:00
Cosimo Lupo
3b62811b63
have dropImpliedOnCurvePoints return the set of point indices useful for testing
2023-06-01 18:21:59 +01:00
Cosimo Lupo
e19871981d
add docstring to dropImpliedOnCurvePoints function
2023-06-01 16:49:30 +01:00
Cosimo Lupo
b7f4e9b83e
move dropImpliedOnCurvePoints function to glyf table module
...
so it can be used by client code on multiple glyf Glyph objects regardles of TTGlyphPen
2023-06-01 16:49:29 +01:00
Cosimo Lupo
a73abc6b87
make drop_implied_oncurves work with multiple interpolatable glyphs
2023-06-01 16:49:29 +01:00
Cosimo Lupo
02a063685f
Merge pull request #3145 from fonttools/ttglyphpen-ignore-empty
...
TTGlyphPen: do not error with empty contours, simply ignore them
2023-05-31 13:48:14 +01:00
Cosimo Lupo
3bbc19abb1
TTGlyphPen: do not error with empty contours, simply ignore them
...
Fixes https://github.com/googlefonts/fontmake/issues/1001
2023-05-31 11:58:14 +01:00
Cosimo Lupo
0bf84f9c7b
Merge pull request #3129 from fonttools/privData_bytes
...
privData needs to padded with bytes not str
2023-05-30 12:10:30 +01:00
Cosimo Lupo
b94c1288ee
Merge pull request #3140 from fonttools/solver-fix
...
[instancer-solver] Fix a bug
2023-05-30 11:30:51 +01:00
خالد حسني (Khaled Hosny)
aaf8f5e78c
Merge pull request #3137 from fonttools/dependabot/github_actions/pypa/gh-action-pypi-publish-1.8.6
...
Bump pypa/gh-action-pypi-publish from 1.4.2 to 1.8.6
2023-05-30 03:05:08 +03:00
خالد حسني (Khaled Hosny)
4c8eaba5ed
Merge pull request #3138 from fonttools/dependabot/github_actions/docker/setup-qemu-action-2.1.0
...
Bump docker/setup-qemu-action from 1.2.0 to 2.1.0
2023-05-30 03:04:51 +03:00
خالد حسني (Khaled Hosny)
0a78c67f31
Merge pull request #3136 from fonttools/dependabot/github_actions/actions/download-artifact-3
...
Bump actions/download-artifact from 2 to 3
2023-05-30 03:04:23 +03:00
خالد حسني (Khaled Hosny)
8fd6698434
Merge pull request #3135 from fonttools/dependabot/github_actions/actions/upload-artifact-3
...
Bump actions/upload-artifact from 2 to 3
2023-05-30 03:04:01 +03:00
Behdad Esfahbod
3ba7e6d706
[instancer-solver] Fix a bug
...
Fixes https://github.com/fonttools/fonttools/issues/3139
2023-05-29 17:39:02 -06:00
dependabot[bot]
6ba2b9832e
Bump docker/setup-qemu-action from 1.2.0 to 2.1.0
...
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action ) from 1.2.0 to 2.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases )
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1.2.0...v2.1.0 )
---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 19:58:50 +00:00
dependabot[bot]
0a2a94cfa8
Bump pypa/gh-action-pypi-publish from 1.4.2 to 1.8.6
...
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish ) from 1.4.2 to 1.8.6.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases )
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.4.2...v1.8.6 )
---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 19:58:45 +00:00
dependabot[bot]
f5f488045a
Bump actions/download-artifact from 2 to 3
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 19:58:40 +00:00
dependabot[bot]
7c4cb86a3b
Bump actions/upload-artifact from 2 to 3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 19:58:35 +00:00
David Corbett
b8dcb85161
[otlLib] Fix error message in MarkBasePosBuilder
2023-05-28 20:29:49 +02:00
Ben Kiel
fb74c16d47
Ran black on code
2023-05-28 08:28:28 -05:00
Ben Kiel
c30f4e5074
fix lint error
2023-05-28 08:19:54 -05:00
Ben Kiel
bdc3afc468
Add in a test for writing private data
2023-05-28 08:12:11 -05:00
خالد حسني (Khaled Hosny)
96bede39e7
Merge pull request #3132 from fonttools/fealib-simplify-variablescaler
...
[feaLib] Simplify variable scalars that don’t vary
2023-05-27 18:20:27 +03:00
Khaled Hosny
fd854d70d8
[feaLib] Simplify variable scalars that don’t vary
...
If a variable scalar does not vary (i.e. all values are the same), we
can simplify it and use a simple value instead. Arguably users shouldn’t
be using variable scalar in this case, but it helps when the feature
code is auto generated so each feaLib users doesn’t have to do the
check done here themselves.
2023-05-27 02:56:11 +03:00
Khaled Hosny
f8abda4570
[feaLib] Refactor-out builder code handling variable scalars
...
Refactor-out this piece of code to simplify the next commit.
2023-05-27 02:55:07 +03:00
Behdad Esfahbod
bf77873d5a
Merge pull request #3127 from fonttools/varStore-optimize-more
...
[varStore.optimize] Use better algorithm
https://github.com/fonttools/fonttools/pull/3127
2023-05-25 20:44:18 +02:00
Behdad Esfahbod
59058bb54f
[varStore.optimize] Address review comment
...
Harmless thinko.
2023-05-25 12:24:46 -06:00
Behdad Esfahbod
4e7cdeb8b1
[varStore.optimize] More idiomatic
2023-05-25 11:35:50 -06:00
Behdad Esfahbod
0a239f15d8
[varStore.optimize] Comment
2023-05-25 11:33:08 -06:00
Behdad Esfahbod
f5e62a1375
[varLib.optimize] Minor more idiomatic
2023-05-25 10:54:13 -06:00
Ben Kiel
d11a67010f
privData needs to pad with bytes not str
2023-05-25 10:30:28 -05:00
Behdad Esfahbod
dbc91b1b5b
[varStore.optimize] Remove unused variable
2023-05-25 08:52:13 -06:00
Behdad Esfahbod
12aba9070f
[varStore.optimize] Combine a couple of loops
2023-05-25 08:50:01 -06:00
Behdad Esfahbod
b0a0f74492
[varStore.optimize] Speed up some more
2023-05-25 08:47:47 -06:00
Behdad Esfahbod
b6ebb4c411
[varStore.optimize] Further speedup
2023-05-25 08:45:53 -06:00
Behdad Esfahbod
d8fabfa362
[varStore.optimize] Remove unused method
2023-05-25 08:28:12 -06:00
Behdad Esfahbod
832f2f766f
[varStore.optimize] Use faster intTools.bit_count as popcount
2023-05-25 08:19:15 -06:00