This was removing semantically-significant difference amongst glyphs
such as two identical glyphs one in Noto Sans Tamil one in Noto Sans
Grantha as in the following issue:
Part of fixing https://github.com/fonttools/fonttools/issues/2475
Part of fixing https://github.com/fonttools/fonttools/issues/2475
Old code was mistakenly only adding the synthetic-generated feature
to the first language-system. In the case of merging Noto Grantha
and Noto Tamil fonts, Noto Tamil had two script systems: 'taml' and
'tml2', and we were adding the synthetic 'locl' feature only to the
DefaultLangSys of the 'taml' script, not the 'tml2' script. That was
the main bug.
A second issue was that the lookup was being added twice to the same
(synthetic) feature. Check before adding lookup, to avoid that.
Using a RoundingPen as a filter doesn't work for TrueType quadratic splines (qCurveTo), because the rounding would occur too early, before these get split into atomic quadratic Bezier segments (by the superclass BasePen.qCurveTo method), thus leaving unwanted floating-point coordinates in the SVG output.
So here we add a 'ntos' parameter (by default simpli calls str()) that takes a Callable[[float], str] and can be used to customize the formatting of the numbers in SVG path coordinates.
Two small changes that significantly speed up subsetting of large fonts
such as Noto Sans CJK:
1. When emptying a charstring, simply empty its program rather than
attempting to decompile it first. (Only relevant when retaining GIDs.)
2. When reindexing charstrings, swap an accidentally-quadratic
implementation for one that is linear in the number of retained glyphs.
* Add default auto doc options
* Ensure all references are unique
* Use anonymous links to avoid duplicate references
* Remove default options, fix wrong module name
* Don’t index repeated class
* Remove repeated classes included through automodule
* Fix warnings
* We don’t use our own static directory
* Correctly format XML in docs
* Fix indentation
* Fix overline
* Bring TOC to top
* Fix definition list
* Offset definition lists and examples
* Fix erroneous markup
* Fix markup
* Already included in automodule
* Fix args markup
* Correct markup for example
* Don’t reindex repeated module
* Correct XML code block markup
* Fix markup errors, change example to doctest
* Correct list markup
* Make ttx docstring both valid RST and valid help output
* Various other boring markup fixes
* Fix example indenting
* Make docstring valid RST and valid help output
* Mock import for reportlab
* It’s ok if manual links don’t appear in toctrees
* Oops typo, I guess doctests are useful