mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-16 02:04:45 +03:00
fixed error
This commit is contained in:
parent
d132c25e5d
commit
652bf225aa
|
@ -52,8 +52,8 @@ try:
|
||||||
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
|
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
|
||||||
self.assertEqual(ttf.path, FONT_PATH)
|
self.assertEqual(ttf.path, FONT_PATH)
|
||||||
self.assertEqual(ttf.size, FONT_SIZE)
|
self.assertEqual(ttf.size, FONT_SIZE)
|
||||||
self.assertTrue(ttf.hasglyph('a')
|
self.assertTrue(ttf.hasglyph('a'))
|
||||||
self.assertFalse(ttf.hasglyph('\ueeee')
|
self.assertFalse(ttf.hasglyph('\ueeee'))
|
||||||
self.assertEqual(ttf.getglyphs(), '....')
|
self.assertEqual(ttf.getglyphs(), '....')
|
||||||
|
|
||||||
ttf_copy = ttf.font_variant()
|
ttf_copy = ttf.font_variant()
|
||||||
|
@ -66,8 +66,8 @@ try:
|
||||||
second_font_path = "Tests/fonts/DejaVuSans.ttf"
|
second_font_path = "Tests/fonts/DejaVuSans.ttf"
|
||||||
ttf_copy = ttf.font_variant(font=second_font_path)
|
ttf_copy = ttf.font_variant(font=second_font_path)
|
||||||
self.assertEqual(ttf_copy.path, second_font_path)
|
self.assertEqual(ttf_copy.path, second_font_path)
|
||||||
self.assertTrue(ttf_copy.hasglyph('a')
|
self.assertTrue(ttf_copy.hasglyph('a'))
|
||||||
self.assertFalse(ttf_copy.hasglyph('\ueeee')
|
self.assertFalse(ttf_copy.hasglyph('\ueeee'))
|
||||||
self.assertEqual(ttf_copy.getglyphs(), '....')
|
self.assertEqual(ttf_copy.getglyphs(), '....')
|
||||||
|
|
||||||
def test_font_with_name(self):
|
def test_font_with_name(self):
|
||||||
|
|
|
@ -496,7 +496,7 @@ font_dealloc(FontObject* self)
|
||||||
|
|
||||||
static PyMethodDef font_methods[] = {
|
static PyMethodDef font_methods[] = {
|
||||||
{"getglyphs", (PyCFunction) font_getglyphs, METH_VARARGS},
|
{"getglyphs", (PyCFunction) font_getglyphs, METH_VARARGS},
|
||||||
{"hasglyph", (PyCFunction) font_hasglyphs, METH_VARARGS},
|
{"hasglyphs", (PyCFunction) font_hasglyphs, METH_VARARGS},
|
||||||
{"render", (PyCFunction) font_render, METH_VARARGS},
|
{"render", (PyCFunction) font_render, METH_VARARGS},
|
||||||
{"getsize", (PyCFunction) font_getsize, METH_VARARGS},
|
{"getsize", (PyCFunction) font_getsize, METH_VARARGS},
|
||||||
{"getabc", (PyCFunction) font_getabc, METH_VARARGS},
|
{"getabc", (PyCFunction) font_getabc, METH_VARARGS},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user