问题
Internet browser I have installed (by default) on my Samsung Tab2 does not display ☐☐
and ☒☒
characters properly. What are alternative solutions?
回答1:
The fonts on Android do not contain these characters, so your options seem to be:
- Use a downloadable font, via
@font-face
. It can be difficult to find a font suitable for this, since most free fonts are rather limited in their character coverage. Among the relatively few fonts that contain these characters (cf. to font coverage info at Fileformat.info), DejaVu Sans might be suitable (though somewhat large in file size, about 668 kilobytes). - Use images. A bit dull these days, but a working solution. In this case, create images that are several times larger than expected font size and scale them down to match the font size, using e.g.
width: 0.6em
for the images. Use a no-break space and the multiplication sign “×” and put, with CSS, them into small boxes with borders. Sample code below. This seems to be the best approach here.
<style> .box { display: inline-block; vertical-align: baseline; line-height: 0.6; border: solid 0.08em; width: 0.6em; height: 0.6em; text-align: center; font-weight: bold; } </style> <span class=box> </span> <span class=box>×</span>
来源:https://stackoverflow.com/questions/12825609/alternative-to-x2610-and-x2612-on-android-samsung-tab-2-browser