some ionicons not showing

Alex Harper picture Alex Harper · Jan 4, 2015 · Viewed 18.8k times · Source

I have noticed that some of the icons I am using in my cordova project are not displaying on any of my devices. The ones that aren't working seem to have the word ios or android in the icon name (eg: ion-android-list or ion-ios-book-outline). Any ideas why they are just showing up blank? So far any icon I have used with a generic name works fine (eg ion-clock, ion-card). The icon names I am fetching from here: ionicons

I have included this in my index.html file:

<link href="lib/ionic/css/ionic.css" rel="stylesheet">

Answer

Alex Harper picture Alex Harper · Jan 5, 2015

Apparently the latest version of ionic when building an ionic app using ionic start from CMD loads an outdated icon library v1.5.2 (latest is v2.0.0).

  • To update the fonts go to the latest ionicons site and download.
  • Unzip and navigate to the /fonts dir and copy these 4 files to the www/lib/ionic/fonts dir of your app (overwrite).
  • Do the same for the scss folder and paste to www/lib/ionic/scss/ionicons (overwrite).
  • Lastly open the ionicons.css file from your extracted zip file /css/ionicicons.css and copy the contents of that file to www/lib/ionic/css/ionicons.css (NOTE: Make sure you edit and only replace the existing font version takes up about the first 1500 - 2000 lines, you will see the comments indicating)