Question

Hi I have an android canvas that I draw text on with a shadow layer and some other text effects. I would like to be able to also draw π onto the canvas to look the same as drawText, but I dont think drawText supports UTF-8 so this is where I am stuck. Does anyone know some other way I can accomplish this? Making my own paths to display would work but I do not know how to make a nice looking pi path. Thanks for any answers!

Was it helpful?

Solution

Base on android documentation about String

A String is represented by array of UTF-16 values, such that Unicode supplementary characters (code points) are stored/encoded as surrogate pairs via Unicode code units (char).

Therefore, you can draw any unicode text in Canvas.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top