Skip to content

Commit

Permalink
Merge pull request #2861 from robin-norwood/fix-imagefont-docs
Browse files Browse the repository at this point in the history
Update docs to reflect that font can be loaded from a stream, not jus…
  • Loading branch information
wiredfool committed Nov 25, 2017
2 parents d20f142 + e3e6da5 commit 3438273
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions PIL/ImageFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,16 @@ def load(filename):
def truetype(font=None, size=10, index=0, encoding="",
layout_engine=None):
"""
Load a TrueType or OpenType font file, and create a font object.
This function loads a font object from the given file, and creates
a font object for a font of the given size.
Load a TrueType or OpenType font from a file or file-like object,
and create a font object.
This function loads a font object from the given file or file-like
object, and creates a font object for a font of the given size.
This function requires the _imagingft service.
:param font: A truetype font file. Under Windows, if the file
is not found in this filename, the loader also looks in
Windows :file:`fonts/` directory.
:param font: A filename or file-like object containing a TrueType font.
Under Windows, if the file is not found in this filename,
the loader also looks in Windows :file:`fonts/` directory.
:param size: The requested size, in points.
:param index: Which font face to load (default is first available face).
:param encoding: Which font encoding to use (default is Unicode). Common
Expand Down

0 comments on commit 3438273

Please sign in to comment.