Search code examples
androidcsscordovawebfonts

Not able to use custom fonts in Phonegap


After looking at various solutions, like this one, I'm still not able to get Elusive Icons working in Phonegap.

It's working fine on my computer, but once I create the app using Adobe app builder, the web font icons are no longer showing.

My folder structure looks like this:

enter image description here

and my CSS looks like this:

@font-face {
  font-family: 'Elusive-Icons';
  src: url('../res/fonts/elusive-icons.ttf') format('truetype'),
       url('../res/fonts/elusive-icons.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

If anyone has any suggestions to what I can do to fix this, I will greatly appreciate that.


Solution

  • After a bit of research, I found this article.

    The builder will not copy the files from the res folder, just the ones you link to in the config file.

    So by moving the /fonts folder to my css folder, the problem was solved.