Docs: fix code-example blocks in varLib.
This commit is contained in:
parent
4b9cb1030e
commit
23e3ab60f8
@ -10,10 +10,14 @@ ttf-interpolatable files for the masters and build a variable-font from
|
||||
them. Such ttf-interpolatable and designspace files can be generated from
|
||||
a Glyphs source, eg., using noto-source as an example:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ fontmake -o ttf-interpolatable -g NotoSansArabic-MM.glyphs
|
||||
|
||||
Then you can make a variable-font this way:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ fonttools varLib master_ufo/NotoSansArabic.designspace
|
||||
|
||||
API *will* change in near future.
|
||||
|
@ -1,7 +1,9 @@
|
||||
"""
|
||||
Instantiate a variation font. Run, eg:
|
||||
|
||||
$ fonttools varLib.mutator ./NotoSansArabic-VF.ttf wght=140 wdth=85
|
||||
.. code-block:: sh
|
||||
|
||||
$ fonttools varLib.mutator ./NotoSansArabic-VF.ttf wght=140 wdth=85
|
||||
"""
|
||||
|
||||
from fontTools.misc.fixedTools import floatToFixedToFloat, floatToFixed
|
||||
@ -162,6 +164,8 @@ def instantiateVariableFont(varfont, location, inplace=False, overlap=True):
|
||||
defining the desired location along the variable font's axes.
|
||||
The location values must be specified as user-space coordinates, e.g.:
|
||||
|
||||
.. code-block::
|
||||
|
||||
{'wght': 400, 'wdth': 100}
|
||||
|
||||
By default, a new TTFont object is returned. If ``inplace`` is True, the
|
||||
|
Loading…
x
Reference in New Issue
Block a user