Added documentation for font_variant() [ci skip]

This commit is contained in:
Andrew Murray 2015-03-07 18:38:17 +11:00
parent 7a798f8724
commit fb3fe4b877

View File

@ -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,