I would use list(map(ord, string)) since unicode codepoint strings are more pythonic (and i only now discover that harfbuzz has buffer_add_codepoints()…yay documentation)
On Thu, Jun 16, 2016 at 11:17 PM, Khaled Hosny <[email protected]> wrote: > On Thu, Jun 16, 2016 at 11:10:03PM -0400, Kelvin Ma wrote: > > ok thanks!! && in that case yall best fix the example at > > https://github.com/behdad/harfbuzz/blob/master/src/sample.py then > because > > it just uses string.encode('utf-x'). which is confusing. > > The example is fine, for UTF-8 the API expects bytes array which is what > str.encode() gives you. May be it can be extended to show how to handle > other encodings, can you send a pull request? > > Regards, > Khaled >
_______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
