خالد حسني (Khaled Hosny)
1c25210360
[featureVars] Re-use FeatureVariationRecord's when possible
...
If a FeatureVariationRecord with the same ConditionTable exists re-use
it and append FeatureTableSubstitutionRecord’s.
Without this, in the following feature code only the first lookup will
be applied since there will be two FeatureVariationRecord with the same
ConditionTable, so the first will be matched and the other will be
skipped:
conditionset test {
wght 600 1000;
wdth 150 200;
} test;
variation ccmp test {
sub e by a;
} ccmp;
variation rlig test {
sub b by c;
} rlig;
With this change only one FeatureVariationRecord will be created with
two FeatureTableSubstitutionRecord’s.
2024-01-10 19:06:26 +02:00
Behdad Esfahbod
36e2c6dcd3
[varLib.models] Simplify based on review
2023-12-12 04:39:05 -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
Cosimo Lupo
97d487638c
models_test: confirm value interpolated from master scalars is as expected
...
and rename test method to match its content
2023-12-08 11:41:59 +00:00
Behdad Esfahbod
0edb0072f3
[varLib.models] Port getMasterScalars tests from Just
...
https://github.com/fonttools/fonttools/pull/3380#issuecomment-1846051270
2023-12-07 13:43:40 -07:00
Behdad Esfahbod
85883f09bc
[varLib.models] Add getMasterScalars
2023-12-07 12:29:00 -07:00
Behdad Esfahbod
4f6c739181
Move LerpGlyphSet and lerp_recordings to more prominent places
...
Fixes https://github.com/fonttools/fonttools/issues/3361
2023-12-07 04:49:59 -07:00
Behdad Esfahbod
8728789c05
[instancer] Don't produce triples outside <-1,0,+1>
...
Fixes https://github.com/fonttools/fonttools/issues/3350
2023-12-06 10:22:11 -05:00
Cosimo Lupo
e538b9c02f
[featureVars_test] test appending records for new features
2023-12-02 11:18:31 +00:00
Cosimo Lupo
82021732ae
[featureVars] expose method to addGSUBFeatureVariations to existing VF
...
Fixes https://github.com/fonttools/fonttools/issues/3357
2023-12-01 18:54:15 +00:00
Cosimo Lupo
a2e05fb084
[varLib_test] use multiple tags in FeatureVarsCustomTag.designspace
2023-12-01 16:53:32 +00:00
Simon Cozens
b5ddc99fb9
linelike intersections ( #3353 )
...
* Replace linelike intersections with line-curve/line-line tests, fixes #3352
* Tests for #3352
2023-11-27 17:27:28 +00:00
Behdad Esfahbod
51e70f9742
[interpolatable] Return master indices in addition to master names ( #3346 )
...
[interpolatable] Add master indices to problem reports
More solid than using names to refer back to the master index,
as needed in interpolatablePlot.
2023-11-20 08:59:11 -07:00
Behdad Esfahbod
c92f378691
[tests] Add test for symfont
2023-11-15 10:31:25 -07:00
Cosimo Lupo
64b2e5c968
Merge pull request #3337 from fonttools/instancer-sync-vmetrics
...
[instancer] Ensure hhea vertical metrics stay in sync with OS/2 after MVAR instancing
2023-11-15 15:02:10 +00:00
Cosimo Lupo
a92b2b0725
[instancer_test] check that vertical metrics stay in sync after MVAR instancing
2023-11-15 14:05:43 +00:00
Cosimo Lupo
f518e5a704
[OS/2] don't error getting/setting codepages if version=0
...
return empty set, or set the bits and bump the version to match
2023-11-15 12:21:02 +00:00
Cosimo Lupo
aaed718e41
[glyf_test] Test that composite referencing empty glyph also gets zero bounds
...
Add reproducer for possible regression in Glyph.recalcBounds introduced with https://github.com/fonttools/fonttools/pull/3301
2023-11-14 16:30:26 +00:00
Simon Cozens
4c60c5f3ba
Clone variable mark anchor before building ( #3330 )
...
* Copy mark anchor before OTifying
* Add test for variable mark anchor
2023-11-13 16:43:55 +00:00
Khaled Hosny
28735a6d0a
[subset] Add --prune-codepage-ranges
2023-11-11 01:54:00 +02:00
Khaled Hosny
be8ec35934
[OS/2] Add recalcCodePageRanges
...
Ported from the ufo2ft code (which is port from FontForge code), with
some additional functions for parity with recalcUnicodeRanges.
2023-11-11 01:54:00 +02:00
Cosimo Lupo
53e71f9eb7
Merge pull request #3309 from fonttools/pyup-scheduled-update-2023-10-23
...
Scheduled weekly dependency update for week 43
2023-11-03 10:33:00 +00:00
Cosimo Lupo
335a1e56ec
re-run black v23.10 on all .py files
2023-11-03 10:25:15 +00:00
Cosimo Lupo
74da89beeb
Merge pull request #3317 from fonttools/instantiate-avgcharwidth
...
Recalc avgcharwidth after instancing
2023-11-03 10:12:07 +00:00
Simon Cozens
71e991b87f
Fixup expectations
2023-11-02 17:28:13 +00:00
Cosimo Lupo
9a46f9d3ab
Merge pull request #3324 from fonttools/otllib-sort-classes
...
[otlLib] make ClassDefBuilder class order match varLib.merger's
2023-11-02 16:47:06 +00:00
Cosimo Lupo
2c07619344
[otlLib] make ClassDefBuilder class order match varLib.mergers
...
see https://github.com/fonttools/fonttools/blob/c3d876/Lib/fontTools/misc/classifyTools.py#L77
i.e. we want (large classes first, then lexicographic order on the glyphs); previously otlLib was sorting by the _reverse_ of (small classes first, then glyphs lexicographic order) -- effectively comparing the reverse of the glyph sets of classes of the same size.
Fixes https://github.com/fonttools/fonttools/issues/3321
note the ttx dump of previously built fonts may change but there won't be any functional changes.
2023-11-02 16:36:48 +00:00
Behdad Esfahbod
ae69e9e8be
[instancer] Allow relaxed limits syntax ( #3323 )
...
* [instancer] Allow relaxed limits syntax
Fixes https://github.com/fonttools/fonttools/issues/3322
Co-authored-by: Cosimo Lupo <clupo@google.com>
2023-11-02 10:22:23 -06:00
Simon Cozens
49570c3599
[instancer] Check if an axis has values before requiring it to be found ( #3319 )
...
* Check if an axis has values before requiring it to be found
* Add test
2023-10-31 08:21:34 +00:00
Behdad Esfahbod
9e36b9465d
[varStore] Micro-optimize storeDeltas()
...
Also speed up the test slightly by skipping rounding.
2023-10-23 15:18:11 -06:00
Behdad Esfahbod
c7ce5b0f3c
[varStore] Handle >65535 items per encoding
...
By creating a new major for each 65535.
2023-10-23 14:43:10 -06:00
Cosimo Lupo
7ca97d6d7f
[subset_test] added NotoSansCJKjp subset to test east-asian-width feature are kept by defailt
2023-10-19 11:20:48 +01:00
Behdad Esfahbod
f1e56cd757
[instancer.solver] Fix case where axisDef < lower and upper < axisMax
...
Fixes https://github.com/fonttools/fonttools/issues/3291
2023-10-16 13:46:39 -06:00
Behdad Esfahbod
27932c525b
[glyf] Add tests for getGlyphID()
2023-10-16 13:14:01 -04:00
Cosimo Lupo
21dea1e18d
fix incorrectly typed cython local variable
...
Fixes https://github.com/fonttools/fonttools/issues/3287
2023-10-06 10:10:46 +01:00
Qunxin Liu
a51b3c9d68
fix the order of prune_unused_regions, should be after vardata optimization
2023-09-05 10:44:29 -07:00
Khaled Hosny
ae31d05605
[ttLib] Fix warning when calling addMultilingualName() with "ar" name
...
I get warning from _makeMacName() because it does not have a TTFont, but
the font is there, just not passed from addMultilingualName() ->
findMultilingualName() -> _makeMacName().
2023-08-13 14:21:32 +03:00
Simon Cozens
57fb47de3a
Allow for merging of NULL anchors ( #3248 )
...
* A failing test for #3247
* Fix up NULL entry/exit records on merge, fixes #3247
2023-08-07 17:12:12 +01:00
Cosimo Lupo
a8d5d45b39
Merge pull request #3241 from fonttools/better-packer
...
[otBase/packer] Allow sharing tables reached by different offset sizes
2023-08-04 16:06:15 +01:00
Cosimo Lupo
d2fd4dfb24
C_O_L_R_test: add test for paint pointed to by both 3- and 4-byte offsets
2023-08-04 11:45:20 +01:00
Cosimo Lupo
48ae9cbf1c
use 0 for sidebearing sparse metrics sentinel
...
font sources only allow to specify advances, the sidebearings are computed. Makes more sense for the sparse metrics to have 0 for the sidebearings as the glyph that's meant to be 'sparse' is most likely empty with no outlines
2023-08-02 15:12:26 +01:00
Cosimo Lupo
ecfc5eeeb7
varLib: use sentinel to mark glyph metrics as sparse
...
as discussed in https://github.com/googlefonts/ufo2ft/issues/501
2023-08-02 14:54:47 +01:00
Cosimo Lupo
653bccdb02
varLib_test: add test for variable CFF2 with empty glyph in sparse master
...
Three masters, Regular and Bold have glyphs .notdef, a, e; Medium only has .notdef (but empty, no contours) and e.
2023-08-02 14:01:01 +01:00
Cosimo Lupo
2dcdb17e90
instancer_test: add test for null ConditionSet offset
2023-07-20 11:15:32 +01:00
Behdad Esfahbod
b0cf3e1ebe
[instancer] Allow null ConditionSet
...
Fixes https://github.com/fonttools/fonttools/issues/3211
2023-07-19 19:55:42 -06:00
Behdad Esfahbod
b14a29c353
[varLib.merger] Support sparse CursivePos
...
Part of https://github.com/fonttools/fonttools/issues/3168
2023-07-18 07:14:25 -06:00
Cosimo Lupo
8846b57304
Merge pull request #3201 from NightFurySL2001/patch-1
...
Convert panoseDefault to namespace object
2023-07-12 19:24:16 +01:00
Behdad Esfahbod
fb56e7b7c9
Merge pull request #3179 from fonttools/L4-fixes
...
L4 fixes
2023-07-11 10:47:59 -04:00
Behdad Esfahbod
0893ba93f8
[instancer/L4] Address review comments
2023-07-11 08:46:46 -06:00
NightFurySL2001
e97aab69eb
Fix test bug
2023-07-08 00:10:12 +08:00