Intended to fix#3213
Revert "Implement Cosimo feedback"
This reverts commit cfede76fd93012a79457232d79884b3c885bf81b.
Revert "remove redundant CPAL name removal code"
This reverts commit b5639410abe9b57d9764639839621d9f1995c873.
Revert "convert name table _prune_pre_subset to prune_post_subset"
This reverts commit 0a6e8bf1c308c843fbbf65e06e4eb5734aa941a2.
Revert "Use NameRecordVisitor in subsetter"
This reverts commit edf8891fba54015c5d37a6397b7b95f14dfe5662.
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.
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.
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
ofter the rounding gives us an opportunity to make an oncurve impliable, for points that were not equidistant become so after round, so why not take it!