mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
Check for raqm version function
This commit is contained in:
parent
1c1447f563
commit
54c83f61bd
|
@ -112,8 +112,8 @@ class TestImagecomplextext(PillowTestCase):
|
|||
try:
|
||||
draw.text((0, 0), 'English あい', font=ttf, fill=500, direction='ttb')
|
||||
except ValueError as ex:
|
||||
if str(ex) == "libraqm 0.6 or greater required for 'ttb' direction":
|
||||
self.skipTest('libraqm 0.6 or greater not available')
|
||||
if str(ex) == "libraqm 0.7 or greater required for 'ttb' direction":
|
||||
self.skipTest('libraqm 0.7 or greater not available')
|
||||
|
||||
target = 'Tests/images/test_direction_ttb.png'
|
||||
target_img = Image.open(target)
|
||||
|
|
|
@ -410,11 +410,11 @@ text_layout_raqm(PyObject* string, FontObject* self, const char* dir, PyObject *
|
|||
else if (strcmp(dir, "ttb") == 0) {
|
||||
direction = RAQM_DIRECTION_TTB;
|
||||
#if !defined(_MSC_VER)
|
||||
if (!dlsym(p_raqm.raqm, "raqm_set_invisible_glyph")) {
|
||||
if (!dlsym(p_raqm.raqm, "raqm_version_atleast")) {
|
||||
#else
|
||||
if (!GetProcAddress(p_raqm.raqm, "raqm_set_invisible_glyph")) {
|
||||
if (!GetProcAddress(p_raqm.raqm, "raqm_version_atleast")) {
|
||||
#endif
|
||||
PyErr_SetString(PyExc_ValueError, "libraqm 0.6 or greater required for 'ttb' direction");
|
||||
PyErr_SetString(PyExc_ValueError, "libraqm 0.7 or greater required for 'ttb' direction");
|
||||
goto failed;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user