Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to reflect that font can be loaded from a stream, not jus… #2861

Merged
merged 2 commits into from
Nov 25, 2017

Conversation

robin-norwood
Copy link
Contributor

…t by filename

I want to load my font from an io.BytesIO stream. It turns out that ImageFont already supports this, but the docs weren't clear on that matter.

Fixes # .

Changes proposed in this pull request:

  • Just a docs update

PIL/ImageFont.py Outdated
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 stream, and create
a font object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just change this instance to file like object, and leave the next one as file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: file-like object for both.

PIL/ImageFont.py Outdated
is not found in this filename, the loader also looks in
Windows :file:`fonts/` directory.
:param font: A filename or binary stream containing a TrueType font.
Under Windows, if the file is not found in this filename,
Copy link
Member

@wiredfool wiredfool Nov 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I think we should change binary stream to file like object.

@robin-norwood
Copy link
Contributor Author

Changed the wording as requested.

@wiredfool wiredfool merged commit 3438273 into python-pillow:master Nov 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants