mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
Added documentation for font_variant() [ci skip]
This commit is contained in:
parent
7a798f8724
commit
fb3fe4b877
|
@ -168,6 +168,15 @@ class FreeTypeFont:
|
|||
return im, offset
|
||||
|
||||
def font_variant(self, font=None, size=None, index=None, encoding=None):
|
||||
"""
|
||||
Create a copy of this FreeTypeFont object,
|
||||
using any specified arguments to override the settings.
|
||||
|
||||
Parameters are identical to the parameters used to initialize this object,
|
||||
minus the deprecated 'file' argument.
|
||||
|
||||
:return: A FreeTypeFont object.
|
||||
"""
|
||||
return FreeTypeFont(font = self.path if font == None else font,
|
||||
size = self.size if size == None else size,
|
||||
index = self.index if index == None else index,
|
||||
|
|
Loading…
Reference in New Issue
Block a user