Docs: black

This commit is contained in:
Nathan Williis 2024-09-11 15:48:09 +01:00
parent 7d93689aca
commit d05cdcf21f
2 changed files with 7 additions and 7 deletions

View File

@ -289,7 +289,7 @@ class FreeTypePen(BasePen):
>> type(a), a.shape >> type(a), a.shape
(<class 'numpy.ndarray'>, (1000, 500)) (<class 'numpy.ndarray'>, (1000, 500))
""" """
import numpy as np import numpy as np
buf, size = self.buffer( buf, size = self.buffer(
@ -333,7 +333,7 @@ class FreeTypePen(BasePen):
Example: Example:
.. code-block:: pycon .. code-block:: pycon
>>> >>>
>> pen = FreeTypePen(None) >> pen = FreeTypePen(None)
>> glyph.draw(pen) >> glyph.draw(pen)
>> pen.show(width=500, height=1000) >> pen.show(width=500, height=1000)

View File

@ -28,7 +28,7 @@ class TTFont(object):
Example usage: Example usage:
.. code-block:: pycon .. code-block:: pycon
>>> >>>
>> from fontTools import ttLib >> from fontTools import ttLib
>> tt = ttLib.TTFont("afont.ttf") # Load an existing font file >> tt = ttLib.TTFont("afont.ttf") # Load an existing font file
@ -42,7 +42,7 @@ class TTFont(object):
For details of the objects returned when accessing each table, see :ref:`tables`. For details of the objects returned when accessing each table, see :ref:`tables`.
To add a table to the font, use the :py:func:`newTable` function: To add a table to the font, use the :py:func:`newTable` function:
.. code-block:: pycon .. code-block:: pycon
>>> >>>
>> os2 = newTable("OS/2") >> os2 = newTable("OS/2")
>> os2.version = 4 >> os2.version = 4
@ -52,13 +52,13 @@ class TTFont(object):
TrueType fonts can also be serialized to and from XML format (see also the TrueType fonts can also be serialized to and from XML format (see also the
:ref:`ttx` binary): :ref:`ttx` binary):
.. code-block:: pycon .. code-block:: pycon
>> >>
>> tt.saveXML("afont.ttx") >> tt.saveXML("afont.ttx")
Dumping 'LTSH' table... Dumping 'LTSH' table...
Dumping 'OS/2' table... Dumping 'OS/2' table...
[...] [...]
>> tt2 = ttLib.TTFont() # Create a new font object >> tt2 = ttLib.TTFont() # Create a new font object
>> tt2.importXML("afont.ttx") >> tt2.importXML("afont.ttx")
>> tt2['maxp'].numGlyphs >> tt2['maxp'].numGlyphs
@ -989,7 +989,7 @@ def tagToIdentifier(tag):
result starts with a number (as the result of a hex escape), an result starts with a number (as the result of a hex escape), an
extra underscore is prepended. Examples: extra underscore is prepended. Examples:
.. code-block:: pycon .. code-block:: pycon
>>> >>>
>> tagToIdentifier('glyf') >> tagToIdentifier('glyf')
'_g_l_y_f' '_g_l_y_f'