fix instancer documentation

This commit is contained in:
Chris Simpkins 2020-05-02 11:00:29 -04:00 committed by GitHub
parent ad4bc6f151
commit f47a9cf204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ font, keeping only the deltas associated with the wdth axis:
| >>> from fontTools import ttLib | >>> from fontTools import ttLib
| >>> from fontTools.varLib import instancer | >>> from fontTools.varLib import instancer
| >>> varfont = ttLib.TTFont("path/to/MyVariableFont.ttf") | >>> varfont = ttLib.TTFont("path/to/MyVariableFont.ttf")
| >>> [a.axisTag for a in partial["fvar"].axes] # the varfont's current axes | >>> [a.axisTag for a in varfont["fvar"].axes] # the varfont's current axes
| ['wght', 'wdth'] | ['wght', 'wdth']
| >>> partial = instancer.instantiateVariableFont(varfont, {"wght": 300}) | >>> partial = instancer.instantiateVariableFont(varfont, {"wght": 300})
| >>> [a.axisTag for a in partial["fvar"].axes] # axes left after pinning 'wght' | >>> [a.axisTag for a in partial["fvar"].axes] # axes left after pinning 'wght'