8

I am using Font Awesome, which was designed for use with Twitter Bootsrap.

The Android (version 2.1) browser on the Galaxy S (Model # GT-I9000M) phone does not display the icons. It shows them as vertical rectangles, similar to what you see here:

enter image description here

Does anybody know a fix to this problem?

merv
  • 67,214
  • 13
  • 180
  • 245
Curt
  • 1,181
  • 3
  • 19
  • 29
  • It's also there as a [separate issue](https://github.com/FortAwesome/Font-Awesome/issues/394). – Peter K. Aug 16 '12 at 15:57
  • There is probably no fix for that. You can't update the browser & that is probably the part that is missing required features. It's not just the icons that are missing, the whole font is missing & replaces by some default font – zapl Aug 16 '12 at 16:11

1 Answers1

8

Here is the across the board support for @font-face: http://caniuse.com/fontface

2.1 browser simply doesn't support it, and it's not properly supported until 4.0. 2.2-3 partial support refers to the use of local(), which isn't supported at all. Font will not work at all on the stock Android browser if you are trying to source local fonts or using it to force user to download yours (smiley face hack).

Edit: How to know if a font (@font-face) has already been loaded? You can use this jQuery plugin to detect if Font-Awesome has loaded. If it hasn't (either due to bad font file or due to lack of support by the phone) then you can add a class which adds a background image (of the icon) to the div/span/whatever (can't be the <i> tag) that the icon has been applied to.

You can see a demo here.

Community
  • 1
  • 1
Patrick
  • 3,490
  • 1
  • 37
  • 64
  • Patrick, Thanks for your reply. Based on http://caniuse.com/fontface , it would seem that Android Browser 2.1 is very old and therefore, most users should have the newer versions that support Font Awesome? – Curt Oct 02 '12 at 15:35
  • 1
    Well, I'm still running a HTC Desire. My provider has stopped supporting it, so I don't get any Android updates unless I decide to root my phone (stuck on 2.1). I think it'll be down to your audience. That said, I've updated my answer with a solution for you. – Patrick Oct 03 '12 at 02:46