85 Commits

Author SHA1 Message Date
Behdad Esfahbod
fc14158cfd [instancer] Fix setting default WWS for recent changes 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
6752d07c98 [instancer] Parse and percolate triples for axis values 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
eae0613a82 [instancer] Carry pinned locations as ranges of (value,value) in axisLimits
Towards L4 instancing.
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
fdaea7a1d8 [instancer] Avoid unnecessary scaling 2022-10-13 10:35:02 -06:00
Cosimo Lupo
87bbb64061
[instancer] downgrade GSUB/GPOS version if there are no FeatureVariations after instancing
same as https://github.com/fonttools/fonttools/pull/2811 but moved the logic to _instantiateFeatureVariations directly, instead of after it
2022-09-13 10:44:26 +01:00
Behdad Esfahbod
aa2dae3be1 [instancer] Run black 2022-08-22 06:28:48 -06:00
Behdad Esfahbod
24c9fb6ffa [cliTools] Rename fragment to suffix 2022-08-22 06:26:30 -06:00
Behdad Esfahbod
e146ddfd86 [cliTools.makeOutputFileName] Add fragment argument
And use it from subsetter and instancer.

Related to https://github.com/fonttools/fonttools/issues/1156
2022-08-19 12:20:21 -06:00
Behdad Esfahbod
a2ed526277 [--help] Remove end-of-line periods 2022-08-18 07:40:13 -06:00
Behdad Esfahbod
171670a15f
[instancer] Simplify a couple of things (#2732)
* [instancer] Simplify normalization
2022-08-15 11:47:09 -06:00
Behdad Esfahbod
13e592cadf [instancer] Fix bug in _instantiateFeatureVariations()
Fixes https://github.com/fonttools/fonttools/issues/2733
2022-08-09 17:15:29 -06:00
Cosimo Lupo
eab9aa5a22 instancer: use_NO_VARIATION_INDEX=False when optimizing {H,V}VAR VarStore
Same as we do in subsetter, see e01f643a8e
2022-07-06 16:36:05 +01:00
Nikolaus Waxweiler
ce38db6562
Merge pull request #2673 from daltonmaag/instancer-set-bits
Set RIBBI bits when cutting instances
2022-07-06 11:01:08 +01:00
Nikolaus Waxweiler
2cd4f7e688 Use NameID enum 2022-07-06 10:40:27 +01:00
Nikolaus Waxweiler
87bf2a866d Update docstring 2022-07-06 10:37:22 +01:00
Cosimo Lupo
c27483fa54 [instancer] add --no-recalc-bounds CLI option 2022-07-05 19:02:21 +01:00
Nikolaus Waxweiler
e84bee9cd9 Set bits only after updating names 2022-07-05 16:10:15 +01:00
Nikolaus Waxweiler
2c773441cf Remove logging 2022-07-05 16:09:37 +01:00
Nikolaus Waxweiler
16d899a2be Apply RIBBI bits to all kinds of fonts 2022-07-05 15:45:44 +01:00
Nikolaus Waxweiler
a3e14643a1 Set RIBBI bits when cutting instances 2022-06-30 18:56:03 +01:00
Behdad Esfahbod
e01f643a8e [varLib.varStore] Support NO_VARIATION_INDEX in optimizer & instancer
Fixes https://github.com/fonttools/fonttools/issues/2211
2022-06-23 12:01:20 -06:00
Cosimo Lupo
d6b5ce7669 [varLib.instancer] add --no-recalc-timestamp option
same as varLib.mutator
2022-06-14 15:16:12 +01: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
Simon Cozens
0f03e6529a
[docs] Fix sphinx warnings (#2453)
* 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
2021-12-02 15:31:49 +00:00
Cosimo Lupo
971043374e instancer: add --ignore-overlap-errors option
This is to be able to ignore tricky glyphs that sometimes trip up Skia PathOps.Simplify operation.
We have no idea how to fix this upstream (short of having the glyphs redrawn), and perfect is the enemy of good..
2021-07-29 16:59:04 +02:00
Chris Simpkins
8a63c06b8b [varLib.instancer] update instantiateVariableFont docs
updated to indicate that Level 3 sub-space ranges are supported, but you must include the default axis value in the new range
2021-05-01 12:04:13 -06:00
Behdad Esfahbod
438dcb5a7f
Update Lib/fontTools/varLib/instancer/__init__.py
Co-authored-by: Nikolaus Waxweiler <madigens@gmail.com>
2021-04-14 21:04:48 -06:00
Behdad Esfahbod
a43690ef5b [varLib.instancer] Add back instantiateGvarGlyph() 2021-04-14 14:43:24 -06:00
Behdad Esfahbod
a756bb01ab [glyf] Prefix setCoordinates, getCoordinatesAndControls, getPhantomPoints
Will add old name with old API next.
2021-04-14 14:09:40 -06:00
Behdad Esfahbod
6aa9d192b6 [varLib] Use TTFont.get() in a couple of places 2021-04-14 13:50:00 -06:00
Behdad Esfahbod
34b5ff623c [varLib] Optimize getPhantomPoints()
To reduce calling TTFont.__getitem__ many times per glyph!
2021-04-13 13:49:12 -06:00
Cosimo Lupo
882d09ca8e
instancer: log.warn is deprecated 2021-03-11 18:24:23 +00:00
Cosimo Lupo
53b13263e9
Merge remote-tracking branch 'origin/main' into mutator-trivial-fixes 2021-03-04 10:49:49 +00:00
Marc Foley
fcc02826b4
Implement Cosimo feedback from previous pr 2021-02-26 10:31:53 +00:00
Cosimo Lupo
2be13d50ac
make instancer into a package dir and move all names-related funcs to submodule
move instancer tests to Tests/varLib/instancer directory

create instancer/__main__.py to make package executable
2021-02-26 10:31:30 +00:00