From d05cdcf21f036dc2cb4ff252b81c2b752c01ee58 Mon Sep 17 00:00:00 2001 From: Nathan Williis Date: Wed, 11 Sep 2024 15:48:09 +0100 Subject: [PATCH] Docs: black --- Lib/fontTools/pens/freetypePen.py | 4 ++-- Lib/fontTools/ttLib/ttFont.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Lib/fontTools/pens/freetypePen.py b/Lib/fontTools/pens/freetypePen.py index 1e3129cea..065da932a 100644 --- a/Lib/fontTools/pens/freetypePen.py +++ b/Lib/fontTools/pens/freetypePen.py @@ -289,7 +289,7 @@ class FreeTypePen(BasePen): >> type(a), a.shape (, (1000, 500)) """ - + import numpy as np buf, size = self.buffer( @@ -333,7 +333,7 @@ class FreeTypePen(BasePen): Example: .. code-block:: pycon - >>> + >>> >> pen = FreeTypePen(None) >> glyph.draw(pen) >> pen.show(width=500, height=1000) diff --git a/Lib/fontTools/ttLib/ttFont.py b/Lib/fontTools/ttLib/ttFont.py index 0942bd80d..d7bd92bc2 100644 --- a/Lib/fontTools/ttLib/ttFont.py +++ b/Lib/fontTools/ttLib/ttFont.py @@ -28,7 +28,7 @@ class TTFont(object): Example usage: .. code-block:: pycon - + >>> >> from fontTools import ttLib >> 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`. To add a table to the font, use the :py:func:`newTable` function: .. code-block:: pycon - + >>> >> os2 = newTable("OS/2") >> os2.version = 4 @@ -52,13 +52,13 @@ class TTFont(object): TrueType fonts can also be serialized to and from XML format (see also the :ref:`ttx` binary): .. code-block:: pycon - + >> >> tt.saveXML("afont.ttx") Dumping 'LTSH' table... Dumping 'OS/2' table... [...] - + >> tt2 = ttLib.TTFont() # Create a new font object >> tt2.importXML("afont.ttx") >> tt2['maxp'].numGlyphs @@ -989,7 +989,7 @@ def tagToIdentifier(tag): result starts with a number (as the result of a hex escape), an extra underscore is prepended. Examples: .. code-block:: pycon - + >>> >> tagToIdentifier('glyf') '_g_l_y_f'