mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 01:04:45 +03:00
fix unichr
This commit is contained in:
parent
93b4321665
commit
0d29026cf4
|
@ -29,6 +29,7 @@ from PIL import Image
|
|||
from PIL._util import isDirectory, isPath
|
||||
import os
|
||||
import sys
|
||||
import six
|
||||
|
||||
|
||||
class _imagingft_not_installed(object):
|
||||
|
@ -168,6 +169,7 @@ class FreeTypeFont(object):
|
|||
index=self.index if index is None else index,
|
||||
encoding=self.encoding if encoding is None else
|
||||
encoding)
|
||||
|
||||
def hasglyphs(self, text):
|
||||
"""
|
||||
Returns true if all the characters in the string exist in the font,
|
||||
|
@ -181,7 +183,7 @@ class FreeTypeFont(object):
|
|||
the font
|
||||
"""
|
||||
codes = self.font.getglyphs()
|
||||
return ''.join(unichr(code) for code in codes)
|
||||
return ''.join(six.unichr(code) for code in codes)
|
||||
|
||||
##
|
||||
# Wrapper that creates a transposed font from any existing font
|
||||
|
|
Loading…
Reference in New Issue
Block a user