7357 Commits

Author SHA1 Message Date
Behdad Esfahbod
9372554dce [cffLib] Typo 2024-10-29 10:31:42 -07:00
Behdad Esfahbod
7a0062a718 [cffLib.specializer] Add cmdline to specialize a CFF2 font 2024-10-29 08:25:20 -06:00
Behdad Esfahbod
4ad6b0db13 [CFF2ToCFF] Map charset to CIDs
This seems to fix the case of ttx not handling the results.
I *think* this fixes the rest of the issues I've been seeing
with this conversion.
2024-10-23 11:36:26 -06:00
Behdad Esfahbod
c384709c0a [CFF2ToCFF] Convert FD's to CFF1
Makes ftview like the font, but still not ttx.
2024-10-23 11:36:26 -06:00
Behdad Esfahbod
87ae6ba224 [CFF2ToCFF] Remove wrong and unnecessary argument
This had no effect though, since file is None.
2024-10-23 11:36:26 -06:00
Behdad Esfahbod
4360969baa [cffLib.transforms] Handle case of one FD in remove_unused_subrs 2024-10-23 11:36:26 -06:00
Behdad Esfahbod
2225c84a1b [CFFToCFF2] Allow fdIndex==0
Oops.
2024-10-23 11:36:26 -06:00
Behdad Esfahbod
7fadfa4e81 Revert "refactor: pass isfinal argument spelled-out not a number"
This reverts commit 6d65a87301b6c746ae0ec1dc1cf0df75c0c21d63.

https://github.com/fonttools/fonttools/pull/3669#issuecomment-2428475144
2024-10-22 01:34:48 -06:00
Robin
6d65a87301 refactor: pass isfinal argument spelled-out not a number 2024-10-22 01:28:05 -06:00
Robin
505c6e1fa3 set isfinal to true to enable xml parser to free resources 2024-10-22 01:28:05 -06:00
Cosimo Lupo
dd8d80a4f2
Merge pull request #3561 from drj11/drj11/unicode-hex
Check unicode elements have required hex attribute
2024-10-15 16:39:12 +02:00
Khaled Hosny
101ff1508c [removeOverlaps] Pass None to T2CharStringPen if widths equals defaultWidthX 2024-10-12 01:45:32 +03:00
Khaled Hosny
40b525c1e3 [removeOverlaps] Fix CFF CharString width
The width argument of `T2CharStringPen()` is inserted directly into the
CharString program, so it must be relative to Private.nominalWidthX, but
CharString.width is a calculated absolute value.

Some implementations, notably Adobe’s, will use the width from the CFF
CharString instead of the one from hmtx table.

Fixes https://github.com/fonttools/fonttools/issues/3658
2024-10-12 01:22:17 +03:00
Behdad Esfahbod
e8146a6d07 [glyf] Add optimizeSize option
Set to True by default. Can be turned to False on the table,
or at Glyph() compile time.

Also fixes Glyph's draw() to expand the glyph first. Otherwise
it was failing.
2024-10-11 08:31:31 -06:00
Behdad Esfahbod
6c2cbc273d [otConverters] Map int32
Unused. For completeness.
2024-10-07 06:08:35 -06:00
Behdad Esfahbod
0213bea88e [TupleVariation] Option to optimize for loading speed, not size 2024-10-06 18:11:48 -06:00
Behdad Esfahbod
0c38f86da9 [MultiVarStore] Remove unused optimize parameter 2024-09-25 09:30:39 -06:00
Simon Cozens
ae96a6d374 Fix cut-and-paste error 2024-09-25 06:34:31 -06:00
n8willis
ff78d5a161
Merge pull request #3637 from n8willis/docs-ufoLib
Docs: ufoLib and misc updates
2024-09-25 11:27:46 +01:00
Khaled Hosny
47c1edbee5 Bump version: 4.54.1 → 4.54.2.dev0 2024-09-24 17:15:33 +03:00
Khaled Hosny
112ace8189 Release 4.54.1 2024-09-24 17:15:32 +03:00
Mark Elliot
4cd0b0d87d Escape \ in subset docs 2024-09-23 12:42:15 -06:00
Behdad Esfahbod
10a61ef7de Update to Unicode 16 2024-09-23 08:46:56 -06:00
Nikolaus Waxweiler
6af41afddf Bump version: 4.54.0 → 4.54.1.dev0 2024-09-23 15:22:33 +01:00
Nikolaus Waxweiler
5429a6c7a4 Release 4.54.0 2024-09-23 15:22:33 +01:00
Nathan Williis
69cecfaa10 Docs: cffLib, minor updates. 2024-09-17 17:23:44 +01:00
Nathan Williis
3cafab8d50 Docs: reconfigure ufoLib documentation. 2024-09-17 17:11:39 +01:00
n8willis
63611d4474
Merge pull request #3627 from n8willis/docs-cleanup
Docs: clean up various code blocks in docstrings, to enable correct syntax highlighting in HTML / RTD output.
2024-09-16 10:40:05 +01:00
Harry Dalton
07351d12e6 Fix visual artefacts with partial L2 instancing
Closes #3634

To produce inferred deltas that will be correct given OpenType's gvar
semantics, fontTool's IUP optimisation module checks the equality of
some points. However, this happens before the points are rounded,
whereas the point comparison that happens at runtime will occur after
the points are rounded (as is necessary to serialise glyf), which leads
to diverging semantics and so diverging and incorrect implied deltas.

This leads to significant visual artefacts, e.g. where large deltas that
should be inferred based on previous values are instead interpreted as 0
at runtime.

I suspect this has gone undetected as the subsetter normally works with
rounded points; in the rarer case that partial VF instancing is
occurring with a different default position, however, varLib.instancer
will calculate and apply the relevant deltas to the font's original
coordinates to effect the new default position, which leads to unrounded
points in memory. This commit ensures that we round directly before
optimising (but still after calculating `glyf` metrics, for backward
compatibility).
2024-09-15 12:10:29 -07:00
Nathan Williis
d05cdcf21f Docs: black 2024-09-11 15:48:09 +01:00
Nathan Williis
7d93689aca Docs: workaround doctest-vs-Sphinx syntax highlighting. 2024-09-11 15:45:46 +01:00
Roel Nieskens
11343ed64c Add instructions to escape question mark
Arguments without it will not work in zsh and possibly other shells.
2024-09-10 11:17:33 -06:00
Roel Nieskens
d871fd3a08 Remove dotslash from examples 2024-09-10 11:17:33 -06:00
Nathan Williis
6914070e00 Docs, minor: remove trailing whitespace. 2024-09-04 17:36:48 +01:00
Nathan Williis
21d04842f8 Docs: fix code-example blocks in ttLib. 2024-09-03 17:55:02 +01:00
Nathan Williis
df49533892 Docs: fix code-example blocks in voltLib. 2024-09-03 17:54:45 +01:00
Nathan Williis
1fc9bc2dca Docs: fix code-example blocks in varLib/instancer. 2024-09-03 17:54:29 +01:00
Nathan Williis
23e3ab60f8 Docs: fix code-example blocks in varLib. 2024-09-03 17:53:56 +01:00
Nathan Williis
4b9cb1030e Docs: fix code-example blocks in svgLib. 2024-09-03 17:52:59 +01:00
Nathan Williis
e7c78970ce Docs: fix code-example blocks in ufoLib. 2024-09-03 17:52:20 +01:00
Nathan Williis
f771c37149 Docs: fix code-example blocks in pens. 2024-09-03 17:52:02 +01:00
n8willis
c2119229cf
Merge pull request #3625 from n8willis/docs-cleanup
Docs: fix Sphinx builds.
2024-09-03 11:21:08 +01:00
Nathan Williis
c19b1c5148 Docs: move module docstrings to first line of file, as per PEP 257. 2024-09-02 17:18:41 +01:00
Cosimo Lupo
afd73dd2b1
NameRecordVisitor: remove unnecessary check for out of bounds nameIDs 2024-08-30 18:20:13 +01:00
Cosimo Lupo
8f01590353
FeatureParamsSize.SubfamilyID is *not* actually a NameID 2024-08-30 18:20:12 +01:00
Cosimo Lupo
821f37329e
NameRecordVisitor: include whole sequence of UI labels for character variants, not just first
Fixes #3616
2024-08-30 18:20:12 +01:00
Behdad Esfahbod
132654c9e5 [varLib.avar] Comment 2024-08-30 08:46:50 -07:00
Behdad Esfahbod
2742c6287c [varLib.avar] Test & fix _pruneLocations 2024-08-30 08:46:50 -07:00
Behdad Esfahbod
700b6a7b0e [varLib.avar] Refactor code
So we can test it.
2024-08-30 08:46:50 -07:00
Behdad Esfahbod
65ab19468d [varLib.avar] Comments and a bug fix
Code was in wrong block.
2024-08-30 08:46:50 -07:00