Skip to content

Commit

Permalink
fix for matplotlib#3669
Browse files Browse the repository at this point in the history
Looks like CharacterComplement doesn't return a unicode string so make it a bytestring in python3
  • Loading branch information
jenshnielsen committed Oct 18, 2014
1 parent 6204ca8 commit f259c45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ft2font_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1309,9 +1309,15 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
t->maxMemType1);
}
case 6: {
#if PY3K
char pclt_dict[] =
"{s:(h,h), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:s, s:y, s:b, s:b, "
"s:b}";
#else
char pclt_dict[] =
"{s:(h,h), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:s, s:s, s:b, s:b, "
"s:b}";
#endif
TT_PCLT *t = (TT_PCLT *)table;
return Py_BuildValue(pclt_dict,
"version",
Expand Down

0 comments on commit f259c45

Please sign in to comment.