1570 Commits

Author SHA1 Message Date
Behdad Esfahbod
204532aee3 [instancer/L4] Misc fixes and fix tests 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
023ad3a363 [instancer/L4] Fix crossing calculation 2023-06-21 15:09:56 -06:00
Khaled Hosny
2f97f1abe9 Rename volto to voltLib.voltToFea 2023-06-14 20:38:18 +03:00
Khaled Hosny
de76e71b7b Add Volto
A tool for converting VOLT VTP projects to feature files.

Essentially https://github.com/TiroTypeworks/TiroTools/tree/master/Volto
with minor modifications to fit into FontTools.
2023-06-14 09:17:47 +03:00
Cosimo Lupo
b3ce0979cb
Merge pull request #3123 from fonttools/avar2-designspace
[designspace] Add avar2 mapping support
2023-06-08 12:58:51 +01:00
خالد حسني (Khaled Hosny)
9ad4a36309
Merge pull request #3130 from fonttools/fealib-ligcaret-variable
[feaLib] Support variable ligature caret position
2023-06-08 14:58:23 +03:00
Cosimo Lupo
dfec4abf6d
glyf: use 'round' parameter in _getCoordinatesAndControls
as Behdad suggested in review
2023-06-08 11:47:47 +01:00
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
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
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
6a276d9f6a
dropImpliedOnCurvePoints: raise if incompatible, skip empty/composites 2023-06-02 13:51:28 +01:00
Cosimo Lupo
a039e1dda8
_g_l_y_f_test: add tests for dropImpliedOnCurvePoints 2023-06-01 19:27:32 +01:00
Behdad Esfahbod
65bc6b7cb0 [designspaceLib/avar2] Remove Windows hack in tests 2023-06-01 12:12:34 -06:00
Behdad Esfahbod
ddf16c9130 [designspaceLib/avar2] Apply review comments 2023-06-01 11:54:43 -06: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
Behdad Esfahbod
77c00719ba [designspaceLib/avar2] Add split test 2023-05-30 23:39:19 -06:00
Behdad Esfahbod
0184c91ce8 [designspaceLib/test] Fix Windows bot failure 2023-05-30 13:51:43 -06:00
Behdad Esfahbod
a08acf41f8 [varLib/avar2] Omit identity VarIdx map 2023-05-30 13:22:12 -06:00
Behdad Esfahbod
d915f08e76 [varLib/avar2] Don't require base master to be specified explicitly
We can deduce it as empty mapping.
2023-05-30 13:13:49 -06:00
Behdad Esfahbod
ff7f49a94c [varLib/avar2] Add compile test 2023-05-30 13:13:49 -06:00
Behdad Esfahbod
aabb26ed69 [designspaceLib/avar2] Add roundtrip test 2023-05-30 12:21:42 -06:00
Khaled Hosny
a43f824af9 [feaLib] Support variable ligature caret position
Allow variable scaler in ligature caret position and build
CaretValueFormat3 with DeviceTable. Does not support non-variable device
table, but can be added if someone really really wants it.
2023-05-30 20:21:21 +03: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
Behdad Esfahbod
3ba7e6d706 [instancer-solver] Fix a bug
Fixes https://github.com/fonttools/fonttools/issues/3139
2023-05-29 17:39:02 -06:00
Behdad Esfahbod
e587942b68 [designspaceLib/avar2] Add tests 2023-05-28 17:35:10 -06: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
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
Behdad Esfahbod
5255c01bcc
Merge pull request #3126 from fonttools/varStore-quantize
Var store quantize
2023-05-25 14:26:47 +02:00
Cosimo Lupo
62bca25c04
Merge pull request #3125 from fonttools/tests-warnings
[Tests] Silence a few deprecation warnings
2023-05-25 13:06:09 +01:00
Behdad Esfahbod
d9649a7835 [varStore] Add test for quantization 2023-05-24 18:10:08 -06:00
Behdad Esfahbod
aeaf98a438 [varStore] Another fix and test 2023-05-24 16:34:15 -06:00
Behdad Esfahbod
ab510d1e7b [varStore] Add test resulting in empty varStore 2023-05-24 15:53:14 -06:00
Behdad Esfahbod
09dfed6b5e [varStore] Remove unused variable in test 2023-05-24 15:38:21 -06:00
Behdad Esfahbod
171741baf2 [varStore] Log XML when first assert fails in test 2023-05-24 15:36:06 -06:00
Behdad Esfahbod
a99e130b26 [Tests] Silence a few deprecation warnings 2023-05-24 14:38:41 -06:00
Behdad Esfahbod
22c76c45ff
Merge pull request #3124 from fonttools/varStore-optimize-fix
[varStore] Improve optimize algorithm
2023-05-24 21:40:47 +02:00
Behdad Esfahbod
abe2a37b6f [varStore] Add another test 2023-05-24 13:30:08 -06:00
Behdad Esfahbod
b72a8da045 [varStore] Adjust encoding overhead in optimize()
Previously we were not accounting for the LOffset to VarData.
2023-05-24 13:21:33 -06:00
Behdad Esfahbod
0677c0e705 [varStore] Another bugfix in optimize() 2023-05-24 13:18:58 -06:00
Behdad Esfahbod
e4281b07bc [varStore] Add test for optimize()
Doesn't hit all branches yet.
2023-05-24 12:51:24 -06:00
Cosimo Lupo
d017d2b173
use pytest importorskip to skip modules that depend on extra requirements
this should allow to run the basic test suite against the dependency-less core of fonttools library
2023-05-24 16:26:48 +01:00
Cosimo Lupo
77a35fe16d
Merge pull request #3119 from fonttools/glyph-data-format-option
fontBuilder: add glyphDataFormat=0; error with accidentally cubic outlines
2023-05-23 14:57:37 +01:00
Cosimo Lupo
57d5da2039
rename parameter validateGlyphFormat and reword docstring as per review 2023-05-23 14:41:16 +01:00
Cosimo Lupo
469c9ad963
add option to skip glyphDataFormat check for speed
If one is certain that the glyph data has compatible format and prefers not to wait for each glyph flag to checked...
2023-05-23 13:16:02 +01:00
Cosimo Lupo
9bb3b652b0
fontBuilder_test: test error with cubics but glyf format 0 2023-05-23 12:56:09 +01:00
خالد حسني (Khaled Hosny)
a537f97b44
Merge pull request #3114 from fonttools/subset-prune-MarkGlyphSetsDef
[subset] Prune GDEF.MarkGlyphSetsDef
2023-05-22 18:33:37 +03:00
Cosimo Lupo
c2c2cb0949
Merge pull request #3115 from fonttools/xml-reader-join-content-chunks
xmlReader: join consecutive text data that had been cut by buffered xml parser
2023-05-22 12:37:23 +01:00