Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c57c795

Browse files
committed
Call set_text also with empty text
1 parent 07b63a3 commit c57c795

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ft2font_wrapper.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,11 @@ static PyObject *PyFT2Font_set_text(PyFT2Font *self, PyObject *args, PyObject *k
668668
return NULL;
669669
}
670670

671+
uint32_t* codepoints_array = NULL;
671672
if (size > 0) {
672-
CALL_CPP("set_text", self->x->set_text(size, &codepoints[0], angle, flags, xys));
673+
codepoints_array = &codepoints[0];
673674
}
675+
CALL_CPP("set_text", self->x->set_text(size, codepoints_array, angle, flags, xys));
674676

675677
return convert_xys_to_array(xys);
676678
}

0 commit comments

Comments
 (0)