Unicode Character On Android Not Displaying
Solution 1:
The character denoted by ☰
does not appear in Android fonts, and its font coverage is relatively limited in other environments, too.
The basic options are using a downloadable font (web font) via @font-face
and to use an image, suitably scaled to text size.
If this is the only “special” character you need, the image approach might be suitable: it is easy, and the shape of the character is so simple that it can be expected to scale well.
Using a downloadable font may produce better results especially if the character is used inline inside text. But you would probably need a font like Quivira or Symbola, which are large (> 1 Mbyte) free fonts, and this would seem to imply a disproportionate overhead if it’s just for one character.
For more info see my Guide to using special characters in HTML.
Solution 2:
Why no one is suggesting the CSS3 method is beyond me. This is supported across almost all devices.
Here's a fiddle to see it in action, http://jsfiddle.net/328k7/.
Use CSS3 to create the trigram, like so:
div {
content: "";
position: absolute;
left: 0;
display: block;
width: 16px;
top: 0;
height: 0;
-webkit-box-shadow: 1px10px1px1px#69737d,1px16px1px1px#69737d,1px22px1px1px#69737d;
box-shadow: 010px01px#69737d,016px01px#69737d,022px01px#69737d;
}
Solution 3:
Its not defined for the current font. You can change the font to something where it is if you only care about your own device, but the only way to make sure its displayed on all devices is to use an image.
Solution 4:
Have a look at the supported characters on Android: Android character sets. It doesn't seem to be supported.
You can probably replace it by an <img src="http://www.fileformat.info/info/unicode/char/2630/trigram_for_heaven.png">
tag.
[Edit] the linked URL is no longer valid, but you can still view it on archive.org:https://web.archive.org/web/20130603091753/http://www.ascendercorp.com/pdf/Droid_fonts.pdf
Solution 5:
I know the original post is old. This is how I accomplished it.
CSS
/*⮛*/.caretdown:before {
font-size: 13px;
font-weight:900;
content:"\002b9b";
}
Substitute on mobile with @media tag
/* If the screen size is 600px or less */@mediaonly screen and (max-width: 600px) {
/*substitute ⮛ on mobile for ▼ */.caretdown:before {
content:"\25BC";
}
}
Post a Comment for "Unicode Character On Android Not Displaying"