Hello everyone.
I am making my first PhoneGap App which is going quite well except for one thing, it is impossible for me to make my custom fonts appear in my App. I followed these instructions (
http://therockncoder.blogspot.co.uk/2014/02/using-google-fonts-in-phonegap-app.html) and am not using 'EB Garamond' from Google Fonts.
The directory structure is like this:
www/res/fonts/EBGaramond.[ttf / woff]
www/css/style.css
And I'm referring to the font files like this in www/css/style.css:
@font-face {
font-family: 'EB Garamond';
font-style: normal;
font-weight: 400;
src: url('../res/fonts/EBGaramond.woff') format('woff');
src: url('../res/fonts/EBGaramond.ttf') format('truetype');
}
The strange thing is that in buth Ripple Emulator and the Phonegap Developer App (phonegap serve) the font appear but not in the PhoneGap build from
build.phonegap.com or the local build by the command 'cordova build'. If I however link the font to the App directly from Google Fonts (<link href='
http://fonts.googleapis.com/css?family=EB+Garamond' rel='stylesheet' type='text/css'>), then the font appears in my build, but I really dont want the font to be loaded from there.
Note: I have used both src: url('../res/[...]') and src: url('res/[....]') but neither work.
I am quite experienced web-developer but this thing is driving me crazy!
Does anyone have a clue for me? Thanks.