mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 19:06:18 +03:00
fix windows build
This commit is contained in:
parent
312c87e279
commit
19929791ee
|
@ -217,7 +217,7 @@ font_getsize(FontObject* self, PyObject* args)
|
||||||
int xoffset, yoffset;
|
int xoffset, yoffset;
|
||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
size_t count;
|
size_t count;
|
||||||
GlyphInfo *glyph_info = NULL;;
|
GlyphInfo *glyph_info = NULL;
|
||||||
PyObject *features = Py_None;
|
PyObject *features = Py_None;
|
||||||
|
|
||||||
/* calculate size and bearing for a given string */
|
/* calculate size and bearing for a given string */
|
||||||
|
@ -481,15 +481,16 @@ failed:
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if (features != Py_None || dir != NULL)
|
|
||||||
PyErr_SetString(PyExc_KeyError, "Raqm is missing.");
|
|
||||||
|
|
||||||
int error, load_flags;
|
int error, load_flags;
|
||||||
FT_ULong ch;
|
FT_ULong ch;
|
||||||
Py_ssize_t count;
|
Py_ssize_t count;
|
||||||
FT_GlyphSlot glyph;
|
FT_GlyphSlot glyph;
|
||||||
FT_Bool kerning = FT_HAS_KERNING(self->face);
|
FT_Bool kerning = FT_HAS_KERNING(self->face);
|
||||||
FT_UInt last_index = 0;
|
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 PY_VERSION_HEX >= 0x03000000
|
||||||
if (!PyUnicode_Check(string)) {
|
if (!PyUnicode_Check(string)) {
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user