Unicode on Android

I have a little problem typing the padding character in android.

char c = '\u2216'; // should be the unicode for complement textView2.setText(c); // gives out "" nothing // if i take c = '\u2229' // it works 

But why can't I print the padding symbol, where is the error? if anyone has a solution, it would be very nice to have it. Thanks!

+5
source share
2 answers

I think this is a font problem .. the font used by the Android studio supports this character, while the Android device (possibly the Robot font family) does not include this character. the solution would be to use the correct font.

Here's how to add a custom font to your project: fooobar.com/questions/67840 / ....

Here is a list of fonts that support this character (U + 2216): http://www.fileformat.info/info/unicode/char/2216/fontsupport.htm

+3
source

Since your device font does not support this “∩” character, you need to embed a font that supports this character.

 Typeface tf = Typeface.createFromAsset(context.getAssets(), "yourfontname.ttf"); //You will need to copy the font to assets folder. textView2.setTypeface(tf); 
0
source

All Articles