Phonegap: Custom Font Not Working

I use the application in PhoneGap using my own font style. The font style is taken in the browser but not used on the Android phone.

<style> @font-face { font-family: 'CooperStd'; src: url('fonts/cooperblackstd.eot'); src: url('fonts/cooperblackstd.eot?#iefix') format('embedded-opentype'), url('fonts/cooperblackstd.woff') format('woff'), url('fonts/cooperblackstd.ttf') format('truetype'), url('fonts/cooperblackstd.svg#CooperBlackStd') format('svg'); font-weight: 900; font-style: normal; } body{font-family:'CooperStd' , arial ; } </style> 

I checked the font path, it also correctly checks the console in the browser. I did not find an error.

Thanks in advance

+7
android css cordova font-face phonegap-build
source share
1 answer

Can you try the relative path from the root folder i.e. instead:

 src: url('fonts/cooperblackstd.eot'); 

try

 src: url('/fonts/cooperblackstd.eot'); 

The intended fonts are the folder at the same level as your .html file in the www folder.

Hi,

+2
source share

All Articles