From 97f1cd55eed19d021e2ca666d36f611eb752c4d8 Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Thu, 25 Jul 2013 18:21:08 +0100 Subject: [PATCH] Fix for #304: test for `str`, not `"utf-8"`. The code wants to produce a `str` object for the given Python version (which is the right thing to do here). --- PIL/ImageFont.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/ImageFont.py b/PIL/ImageFont.py index 5851c90fc..2cb9c41d2 100644 --- a/PIL/ImageFont.py +++ b/PIL/ImageFont.py @@ -261,7 +261,7 @@ def load_path(filename): "Load a font file, searching along the Python path." for dir in sys.path: if isDirectory(dir): - if not isinstance(filename, "utf-8"): + if not isinstance(filename, str): if bytes is str: filename = filename.encode("utf-8") else: