Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Font Awesome to work on iOS Safari Browser on a Ruby based Website

I have searched and tried to find the answer to this. Though nothing seems to be working.

We are writing a Ruby Web App. Using the latest version of Font Awesome (3.2.1), the icons aren't rendering on iOS. They are rendering on desktop browsers as well as we are able to use other web fonts (@font-face method), on iOS.

Not seeing any errors in the web inspector for iOS or in desktop Chrome and Safari. We are able to get other websites to work with Font Awesome on iOS, but not through Ruby on iOS.

Tried implementing older versions of Font Awesome for this instance with no luck.

like image 708
Robert Egnacheski Avatar asked Nov 01 '22 15:11

Robert Egnacheski


1 Answers

Font awesome uses many different file types to embed it's font.

If your site is showing up in certain browsers it's highly likely that you have not correctly copied one of the font sources across.

Depending on what version of iOS it is failing on I would double check the .ttf and .svg format.

@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=4.1.0'); /* IE9 Compat Modes */
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), /* Modern Browsers */
       url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), /* Safari, Android, iOS */
       url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');/* Legacy iOS */
  font-weight: normal;
  font-style: normal;
}
like image 58
jnowland Avatar answered Nov 09 '22 10:11

jnowland