def __init__(self, font=None, size=10, index=0, encoding="", file=None): # FIXME: use service provider instead if file: if warnings: warnings.warn("file parameter deprecated, please use font parameter instead.", DeprecationWarning) font = file if isStringType(font): self.font = core.getfont(font, size, index, encoding) else: self.font_bytes = font.read() self.font = core.getfont("", size, index, encoding, self.font_bytes)
def __init__(self, font=None, size=10, index=0, encoding=""): # FIXME: use service provider instead self.path = font self.size = size self.index = index self.encoding = encoding if isPath(font): self.font = core.getfont(font, size, index, encoding) else: self.font_bytes = font.read() self.font = core.getfont( "", size, index, encoding, self.font_bytes)
def __init__(self, font=None, size=10, index=0, encoding="", file=None): # FIXME: use service provider instead if file: if warnings: warnings.warn( 'file parameter deprecated, please use font parameter instead.', DeprecationWarning) font = file if isStringType(font): self.font = core.getfont(font, size, index, encoding) else: self.font_bytes = font.read() self.font = core.getfont("", size, index, encoding, self.font_bytes)
def __init__(self, file, size, index=0, encoding=""): # FIXME: use service provider instead import _imagingft self.font = _imagingft.getfont(file, size, index, encoding)
def __init__(self, file, size, index=0, encoding=""): # FIXME: use service provider instead self.font = core.getfont(file, size, index, encoding)