From 1b7401a8b9a6a6a4f74c2b2ee350906a735a452d Mon Sep 17 00:00:00 2001 From: Fahad Al-Saidi Date: Tue, 13 Dec 2016 09:07:29 +0400 Subject: [PATCH] fix windows build --- _imagingft.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/_imagingft.c b/_imagingft.c index ae570af51..948854b6d 100644 --- a/_imagingft.c +++ b/_imagingft.c @@ -217,7 +217,7 @@ font_getsize(FontObject* self, PyObject* args) int xoffset, yoffset; const char *dir = NULL; size_t count; - GlyphInfo *glyph_info = NULL;; + GlyphInfo *glyph_info = NULL; PyObject *features = Py_None; /* calculate size and bearing for a given string */ @@ -481,15 +481,16 @@ failed: return count; #else - if (features != Py_None || dir != NULL) - PyErr_SetString(PyExc_KeyError, "Raqm is missing."); - int error, load_flags; FT_ULong ch; Py_ssize_t count; FT_GlyphSlot glyph; FT_Bool kerning = FT_HAS_KERNING(self->face); FT_UInt last_index = 0; + + if (features != Py_None || dir != NULL) + PyErr_SetString(PyExc_KeyError, "setting text direction or font features is not supported without libraqm"); + #if PY_VERSION_HEX >= 0x03000000 if (!PyUnicode_Check(string)) { #else