fixed error

This commit is contained in:
Micah Chambers 2016-05-20 05:11:05 +00:00
parent d132c25e5d
commit 652bf225aa
2 changed files with 5 additions and 5 deletions

View File

@ -52,8 +52,8 @@ try:
ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
self.assertEqual(ttf.path, FONT_PATH)
self.assertEqual(ttf.size, FONT_SIZE)
self.assertTrue(ttf.hasglyph('a')
self.assertFalse(ttf.hasglyph('\ueeee')
self.assertTrue(ttf.hasglyph('a'))
self.assertFalse(ttf.hasglyph('\ueeee'))
self.assertEqual(ttf.getglyphs(), '....')
ttf_copy = ttf.font_variant()
@ -66,8 +66,8 @@ try:
second_font_path = "Tests/fonts/DejaVuSans.ttf"
ttf_copy = ttf.font_variant(font=second_font_path)
self.assertEqual(ttf_copy.path, second_font_path)
self.assertTrue(ttf_copy.hasglyph('a')
self.assertFalse(ttf_copy.hasglyph('\ueeee')
self.assertTrue(ttf_copy.hasglyph('a'))
self.assertFalse(ttf_copy.hasglyph('\ueeee'))
self.assertEqual(ttf_copy.getglyphs(), '....')
def test_font_with_name(self):

View File

@ -496,7 +496,7 @@ font_dealloc(FontObject* self)
static PyMethodDef font_methods[] = {
{"getglyphs", (PyCFunction) font_getglyphs, METH_VARARGS},
{"hasglyph", (PyCFunction) font_hasglyphs, METH_VARARGS},
{"hasglyphs", (PyCFunction) font_hasglyphs, METH_VARARGS},
{"render", (PyCFunction) font_render, METH_VARARGS},
{"getsize", (PyCFunction) font_getsize, METH_VARARGS},
{"getabc", (PyCFunction) font_getabc, METH_VARARGS},