10801 Commits

Author SHA1 Message Date
dependabot[bot]
68237fc974
Bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.8
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.6 to 1.8.8.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.6...v1.8.8)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 19:11:33 +00:00
Cosimo Lupo
56731a9f14
Merge pull request #3204 from daltonmaag/fix-unicodedata-typing
Fix typing of script_horizontal_direction()
2023-07-13 15:30:00 +01:00
Harry Dalton
9bfb72b055 Fix typing of script_horizontal_direction()
Without explicit annotation, some type checkers infer that the type of
the 'default' argument can only be type[KeyError]. This was the case
in unicodedata_test.py, where pyright disallowed "LTR". This commit adds
annotations to avoid this, fixing the issue in the test (and external
code dependent on the API).

Some of the other functions in this file have the same semantics and
suffer from the same type error, and so this fix could also be extended
to them as usage requires.
2023-07-13 13:53:36 +01:00
Harry Dalton
d61cad65fc Remove some of the str conversions that are redundant in Python 3 2023-07-13 13:50:55 +01:00
Cosimo Lupo
fac5b47060
Bump version: 4.41.0 → 4.41.1.dev0 2023-07-12 19:27:22 +01:00
Cosimo Lupo
66fbd09186
Release 4.41.0 2023-07-12 19:27:21 +01:00
Cosimo Lupo
ba703e5bc5
Update NEWS.rst [skip ci] 2023-07-12 19:26:53 +01: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
Cosimo Lupo
c9d965b581
Merge pull request #3185 from m4rc1e/clean-nametable
Remove redundant name table records
2023-07-12 19:12:15 +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
Cosimo Lupo
5ac1e5bc1a
Merge pull request #3202 from fonttools/cff-latin1-strings
CFF: use latin1 so we can roundtrip non-ASCII in {Full,Font,Family}Name
2023-07-10 19:39:06 +01:00
Cosimo Lupo
a8bd0ef1b0
CFF: use latin1 so we can roundtrip non-ascii in FullName|FontName|FamilyName
Fixes #2898

use Latin1Converter for all name strings, and not just for Notice and Copyright. Then at least we can round-trip binary=>TTF=>binary, even if the TTX will not show the intended string.

Given that any non-ASCII in FullName can be considered broken, this at least this would let us round-trip without error.
2023-07-10 18:12:49 +01:00
Marc Foley
cfede76fd9 Implement Cosimo feedback 2023-07-10 15:01:40 +01:00
Marc Foley
3bd6eefb65 rm Snippets/clean-nametable.py 2023-07-10 14:41:01 +01:00
NightFurySL2001
e97aab69eb
Fix test bug 2023-07-08 00:10:12 +08:00
David Corbett
4660b8c359 Return three-byte operands from encodeIntCFF 2023-07-07 12:01:15 -04:00
NightFurySL2001
20236624e1
Add panose test for fontbuilder 2023-07-07 23:34:02 +08:00
NFSL2001
be44c92cfa
Update Lib/fontTools/ttLib/tables/O_S_2f_2.py
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2023-07-07 23:12:44 +08:00
NightFurySL2001
ef8e15a08c
Use Panose class 2023-07-07 22:09:58 +08:00
NightFurySL2001
ef95a58c3c
Convert panoseDefault to namespace object 2023-07-07 21:36:40 +08:00
Behdad Esfahbod
3235454fcd [designspace] Mark <source name="..."> as optional
Fixes https://github.com/fonttools/fonttools/issues/3193
2023-06-29 12:33:05 -04:00
Marc Foley
b5639410ab remove redundant CPAL name removal code 2023-06-28 17:18:12 +01:00
Marc Foley
0a6e8bf1c3 convert name table _prune_pre_subset to prune_post_subset 2023-06-28 17:02:34 +01:00
Behdad Esfahbod
46086cdb66 [interpolatable] Add --glyphs 2023-06-27 16:59:05 -06:00
Behdad Esfahbod
09464e5825 Comment 2023-06-27 09:53:37 -06:00
Behdad Esfahbod
9974a74a18 [cubic-glyf] Fix drawPoints() contour ending with cubic offCurve
Fixes https://github.com/fonttools/fonttools/issues/3189
2023-06-27 11:48:25 -04:00
Behdad Esfahbod
1138e5b0df [Tests] Add cmap to dot-cubic.ttf
So we can test it with svgPathPen.
2023-06-27 08:54:42 -06:00
Behdad Esfahbod
4ae0a93692 black
I'm sorry.
2023-06-27 08:49:31 -06:00
Behdad Esfahbod
9983ffe27a [cubic-glyf] Fix tests
Ouch.
2023-06-27 08:47:56 -06:00
Behdad Esfahbod
9ec121322b [cubic-glyf] Emit integers instead of floats when possible
I was seeing unnecessary ".0" in the SVG output. Granted,
should probably be fixed in the SVG pen as well. Will do.
2023-06-27 08:43:44 -06:00
Behdad Esfahbod
0b11a46e3a [cubic-glyf] Fix rendering no-oncurve outlines
Test coming.
2023-06-27 08:39:29 -06:00
Marc Foley
edf8891fba Use NameRecordVisitor in subsetter 2023-06-27 15:23:56 +01:00
Marc Foley
a792851131 add removeUnusedNames staticmethod to name table 2023-06-27 12:06:18 +01:00
Just van Rossum
5d42fd79f6
Merge pull request #3184 from fonttools/propagate-hidden-flag
[FontBuilder] Propagate the 'hidden' flag to the fvar Axis instance
2023-06-26 22:18:09 +02:00
Marc Foley
552525dc84 clean-nametable added 2023-06-26 16:45:24 +01:00
Just van Rossum
014e6c5800 Propagate the 'hidden' flag to the fvar Axis instance 2023-06-26 17:18:40 +02:00
Just van Rossum
44cfe35b37
Merge pull request #3183 from fonttools/issue3182
[FontBuilder] Update setupAvar() to also support avar-2, fixing _add_avar() call site
2023-06-25 22:24:41 +02:00
Just van Rossum
a912f7d16f Add minimal avar test 2023-06-25 16:09:05 +02:00
Just van Rossum
b4ce8177ec Fix exception message 2023-06-25 15:48:16 +02:00
Just van Rossum
d59291a9c5 Update setupAvar to also support avar-2, fixing _add_avar() call site 2023-06-25 15:31:08 +02:00
Behdad Esfahbod
978decb3a2 [merge.cff] Fix error message
As noticed in https://github.com/fonttools/fonttools/issues/3175
2023-06-22 09:56:35 -06:00
Behdad Esfahbod
71cca00b05 [instancer/L4] Remove an unreachable code path and better comment 2023-06-21 19:01:27 -06:00
Behdad Esfahbod
ddc484d384 [instancer/L4] Add a comment 2023-06-21 18:30:19 -06:00
Behdad Esfahbod
10bc7a804a [instancer/L4] Implement an optimization 2023-06-21 17:52:12 -06:00
Behdad Esfahbod
17761cc616 [instancer/L4] Add tests 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
204532aee3 [instancer/L4] Misc fixes and fix tests 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
43e5aae018 [instancer/L4] Fix avar mapping as well 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
72b6102949 [instancer/L4] Fix normalizeValue for L4 solver
Imagine a font with current min/default/max of 100,700,1000. And new
setting of 100,400,1000. The current normalizeLocation will calculate
the new location for 700 to be +.33, whereas it should calculate +.5!
This is because 400 translates to -.5, so 700 will be normalized to
-1,-.5,+1 and get +.33...

We need a special normalizeLocation that is aware of the "distance"
between min/default/max, ie. the non-normalized values. Then it will be
clear that the distance from 400 to 700 is equal to 700 to 1000, and as
such 700 should be normalized to .5, not .33... I'm still trying to
figure out the case where avar is present.

Store this distance in NormalizeAxisLimit and reach it out in the
solver.

Fixes https://github.com/fonttools/fonttools/issues/3177
2023-06-21 15:09:56 -06:00
Behdad Esfahbod
94e081611c [instancer/L4] Further simplify
outGain is always zero in this branch.
2023-06-21 15:09:56 -06:00