5720 Commits

Author SHA1 Message Date
Cosimo Lupo
ec79257960 [optimize.gpos] declare/re-export option from module 2022-04-21 15:46:12 +01:00
Cosimo Lupo
1bb9607b72 [subset] add --no-harfbuzz-repacker CLI flag 2022-04-21 15:46:12 +01:00
Cosimo Lupo
c204537073 [otBase] check USE_HARFBUZZ_REPACKER in TTFont.cfg, add more logging 2022-04-21 15:46:12 +01:00
Cosimo Lupo
fea57a5cea [config] register USE_HARFBUZZ_REPACKER option 2022-04-21 15:46:12 +01:00
Cosimo Lupo
e5d674ea5e [configTools] accept either str or Option in Config mapping API 2022-04-21 15:46:12 +01:00
Cosimo Lupo
9a0dfbd403 [configTools] add copy constructor to Options 2022-04-21 14:31:58 +01:00
Cosimo Lupo
5aa8986179 [configTools] add __repr__ to Options mapping
print the default value only for brevity
2022-04-21 14:31:58 +01:00
Just van Rossum
0ffe320b77 [cmap] don't handle expected case in exception handler, to avoid confusing tracebacks, such as seen in #2584 2022-04-18 09:15:01 +02:00
Cosimo Lupo
e92dd05101
Merge pull request #2552 from qxliu76/add_hb_repack
Use Harfbuzz Repacker for packing GSUB/GPOS tables
2022-04-14 20:03:18 +01:00
Cosimo Lupo
2c458719de
Merge pull request #2580 from skef/bg1899
Handle implicit CFF2 closepath within T2OutlineExtractor
2022-04-14 20:03:01 +01:00
Qunxin Liu
fe196bf88e Use Harfbuzz Repacker for packing GSUB/GPOS tables 2022-04-14 10:42:50 -07:00
Jany Belluz
abc0441957 [config] Add new config module and use it for GPOS compression level 2022-04-14 15:23:02 +01:00
Jany Belluz
e530c2fa1c [misc] Add new configTools module 2022-04-14 15:20:52 +01:00
Skef Iterum
520ee0236d Handle implicit CFF2 closePath within T2OutlineExtractor 2022-04-14 07:19:44 -07:00
Jany Belluz
2ea5dc3496 [varLib] Add support for designspace 5 + STAT generation + tests 2022-04-14 15:05:50 +01:00
Jany Belluz
35e560603e [designspaceLib] Add designspace 5 code 2022-04-14 15:03:58 +01:00
Just van Rossum
169731c7f5
[CFF/T2] Ensure that pen.closePath() gets called for CFF2 charstrings (#2577)
* [CFF/T2] Make sure to call pen.closePath() at the end of a CFF2/T2 charstring. Fixes #2455

* Add test case to verify pen.closePath() behavior
2022-04-09 14:50:59 +02:00
justvanrossum
c6cd6cf421 [TTFont] sync doc string with the one in _c_m_a_p.py (see also #1367) 2022-04-09 08:31:03 +02:00
Behdad Esfahbod
17f71c0eb7 [cmap] Document rationale for getBestCmap choice of subtable
Fixes https://github.com/fonttools/fonttools/issues/1367
2022-04-08 13:27:44 -06:00
Cosimo Lupo
43e4315009 Bump version: 4.32.0 → 4.32.1.dev0 2022-04-08 16:07:06 +01:00
Cosimo Lupo
84f3c50099 Release 4.32.0 2022-04-08 16:07:06 +01:00
Simon Cozens
2d62a2ac9e
Disable GSUB5 optimization (#2540)
* Disable GSUB5/GPOS7 optimization

* Revert "Fixup test expectations"

This reverts commit 7db13c9872884772312727e3478fb36ed9883004.

* Revert "Rename GPOS8->GPOS7"

This reverts commit 6d4c5fe31c9199e6d3e46cd0808e7640d1610e75.

* Revert "Fix varlib test expectations - now badly named."

This reverts commit 4adea942cc73b6afe58e00278da6cb3795935970.

* Allow GSUB5, disable GPOS7

* Revert "Revert "Fixup test expectations""

This reverts commit 42993ae6917f8f6e4c31f4be123caca24d27d2da.

* Fix up expectations
2022-04-08 15:54:34 +01:00
Cosimo Lupo
7ee2c9d891 testTools: factor our method to strip variable items from ttx dumps
it was scattered here and there, so define it once and reuse everywhere needed
2022-04-05 18:34:30 +01:00
justvanrossum
9ffb2e0f75 removed cringy comments from a long long long long time ago 2022-04-05 17:02:34 +02:00
Behdad Esfahbod
f0214415cc [interpolatable] Fix assert 2022-04-01 14:36:03 -06:00
Behdad Esfahbod
86b5d7103d [interpolatable] Downgrade assert 2022-04-01 14:00:22 -06:00
Behdad Esfahbod
6b4e2e7147 [ufoLib / interpolatable] Wire up outputImpliedClosingLine parameter
ufoLib's glyph draw() was passing outputImpliedClosingLine=False to
PointToSegmentPen(). This was causing incompatible nodes in
interpolatable tool for certain fonts, like this in NotoSansDevanagari:

Glyph dabhadeva was not compatible:
    Node count differs in path 1: 23 in NotoSansDevanagari-Bold, 24 in NotoSansDevanagari-CondensedBold
    Node count differs in path 1: 24 in NotoSansDevanagari-CondensedBold, 23 in NotoSansDevanagari-CondensedLight

Because a final lineto before a closepath was being elided or not in
some masters but not others.  Wire up the parameter and control it
from interpolatable tool to fix this.
2022-04-01 13:14:39 -06:00
Behdad Esfahbod
3165cc132a [interpolatable] Add mirrored rotated contour for starting-point check
This further found an issue in NotoSansArabic which I visually verified:

Glyph qafLamAlefMaksuraabove-ar was not compatible:
    Contour start point differs: NotoSansArabic-CondensedLight, NotoSansArabic-CondensedSemiBold
    Contour start point differs: NotoSansArabic-CondensedLight, NotoSansArabic-CondensedSemiBold
    Contour start point differs: NotoSansArabic-CondensedSemiBold, NotoSansArabic-Condensed
    Contour start point differs: NotoSansArabic-CondensedSemiBold, NotoSansArabic-Condensed
2022-03-31 20:23:54 -06:00
Behdad Esfahbod
9e96b95467 [interpolatable] Don't keep contour-start-point index 2022-03-31 20:18:44 -06:00
Behdad Esfahbod
b705bcdc8f [interpolatable] When checking for contour start point error allow for 5% error 2022-03-31 20:16:55 -06:00
Behdad Esfahbod
745631d16b [interpolatable] In diff-contour-order, allow for 5% cost difference
Reduces false-positives, as in this one in NotoSansArabic:

Glyph asteriskArt-ar was not compatible:
    Contour order differs: [0, 1, 2, 3, 4, 5] in NotoSansArabic-CondensedBold, [0, 3, 2, 1, 4, 5] in NotoSansArabic-CondensedLight
2022-03-31 19:52:48 -06:00
Behdad Esfahbod
3a846a5389 [interpolatable] Remove the empirical high-cost error
This was very empirical and has no theoretical background. Experiment
shows that this is mostly false-positive.
2022-03-31 19:37:00 -06:00
Behdad Esfahbod
d0d8039bd3 [varLib.interpolatable] Check for wrong contour starting point
This seems to work already. Detects the example in the issue.
I also ran this on master-compatible UFOs built from Noto Sans,
and detected several issues. Confirmed visuall in AxisPraxis that
theta.sc for example has wrong starting point in that font:

Glyph theta.sc was not compatible:
    Contour start point differs: NotoSans-DisplayRegular, NotoSans-DisplaySemiBoldCondensed
    Contour start point differs: NotoSans-DisplayRegular, NotoSans-DisplaySemiBoldCondensed
    Contour start point differs: NotoSans-DisplaySemiBoldCondensed, NotoSans-DisplaySemiBold
    Contour start point differs: NotoSans-DisplaySemiBoldCondensed, NotoSans-DisplaySemiBold

There's a TODO item left to be done, which is to check for mirrored
contours and rotations thereof.

Towards fixing https://github.com/fonttools/fonttools/issues/1801
2022-03-31 19:17:22 -06:00
Khaled Hosny
4bb0e776a7
Merge pull request #2570 from fonttools/cff-TopDictIndex
[cffLib] Fix calls to TopDictIndex()
2022-04-01 00:24:17 +02:00
Behdad Esfahbod
c7781ec423 [cffLib] Remove leftover GlobalState
Fixes https://github.com/fonttools/fonttools/issues/1848
2022-03-31 15:34:11 -06:00
Behdad Esfahbod
64fc028eee [cffLib] Fix calls to TopDictIndex()
Fixes https://github.com/fonttools/fonttools/issues/1847
2022-03-31 15:33:05 -06:00
Just van Rossum
eaafd6089e
Clear AxisValueArray if it is empty after instantiating. (#2563)
* Clear AxisValueArray if it is empty after instantiating. Fixes #2562

* rearrange the code a bit for clarity
2022-03-25 16:42:17 +01:00
Khaled Hosny
a83f07670e Bump version: 4.31.2 → 4.31.3.dev0 2022-03-22 14:57:43 +02:00
Khaled Hosny
5e849a4479 Release 4.31.2 2022-03-22 14:57:32 +02:00
Khaled Hosny
47457b14d6
[varLib] Fix instantiating some SinglePos subtables (#2555) 2022-03-22 08:34:18 +00:00
Cosimo Lupo
0465f81b79 Bump version: 4.31.1 → 4.31.2.dev0 2022-03-18 13:30:10 +00:00
Cosimo Lupo
1a30ee825c Release 4.31.1 2022-03-18 13:30:10 +00:00
Cosimo Lupo
315705a58f [subset] fix subsetting OT-SVG when glyph id attribute is on the root <svg> element
Fixes https://github.com/fonttools/fonttools/issues/2548
2022-03-18 13:18:53 +00:00
Cosimo Lupo
caa32df25a Bump version: 4.31.0 → 4.31.1.dev0 2022-03-18 11:12:10 +00:00
Cosimo Lupo
422a10b61b Release 4.31.0 2022-03-18 11:12:10 +00:00
Cosimo Lupo
d7169774ac
Merge pull request #2551 from fonttools/unlazy
add ensureDecompiled method to decompile all the tables irrespective of lazy attribute
2022-03-18 10:55:48 +00:00
Cosimo Lupo
25746a3600 add clarifying comment as per review 2022-03-18 09:23:07 +00:00
Cosimo Lupo
ab8fc321a7 otBase: also return name and index from iterSubTables
makes it more useful for constructing generic traversals of trees of otTables
2022-03-17 17:47:41 +00:00
Cosimo Lupo
43d2ee2822 Revert "return self so one can do font=TTFont(file).ensureDecompiled()"
This reverts commit 61e7b294483cbe729b1437804406b4571ae57cfb.
2022-03-17 15:55:20 +00:00
Cosimo Lupo
61e7b29448 return self so one can do font=TTFont(file).ensureDecompiled() 2022-03-17 15:44:02 +00:00