user4928488
user4928488

Reputation:

Phonegap : Custom font is not working

I am doing an application in PhoneGap using custom font style. The font style is taking in browser , but not taking in 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 is correct also check console in browser. There is no error that I found.

Thanks in advance

Upvotes: 7

Views: 1419

Answers (1)

Palvinder
Palvinder

Reputation: 1447

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

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

try

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

presuming fonts is a folder at the same level as your .html file under the www folder.

Regards,

Upvotes: 2

Related Questions