python version control in _draw_mathtext as in draw_text
Thanks for your time to create a PR, @burrbull. I have one question, is there anything wrong with encoding unicode in python 3.x? Since strings are unicode by default in python 3.x, isn't s.encode("utf-8") a no-op?
s.encode('utf-8') converts a Unicode string to a byte string (encoded in utf-8). My understanding is that Cairo on Python 2.x expects a utf-8-encoded byte string to be passed to it, whereas under Python 3.x it expects an actual Unicode string. So this fix makes sense to me.