Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicode in Android

i have a little problem by printing the complement symbol 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 i cant print out the complement symbol, where is the mistake ? if someone has a solution, it would be very nice to shar it. Thanks !

like image 372
devlog101010 Avatar asked Oct 20 '22 09:10

devlog101010


1 Answers

I think its a font issue .. the font used by Android studio supports that character while the android device (propably Robot font family) doesn't include that glyph.. solution would be to use proper font.

Here how to add custom typeface to your project : https://stackoverflow.com/a/27588966/2267723.

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

like image 109
Maher Abuthraa Avatar answered Oct 21 '22 23:10

Maher Abuthraa