Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

custom font not working in phonegap


I'm trying to use custom font in phone gap using-

@font-face {
font-family: "customfont";
src: url("./fonts/CFBacktoSchool-Regular.ttf") format("truetype");   
}
body {
    font-family: "customfont";
}

but it does not work for me.
What is the problem? Help me please!

like image 247
Andy Avatar asked Sep 13 '13 11:09

Andy


1 Answers

finally I overcome this issue on Persian And Arabic custom fonts,

Keep all the codes with @fontface as same as it is, Download this package http://averta.net/labs/fa/?p=10

From extracted archive, add bifon-1.1b.js to your html and use this script

function onDeviceReady() {

    $('#txt1').text(FarsiStyle.convert('سلام عليكم').split('').reverse().join('').split(' ').reverse().join(' '));

} 

which txt1 is a div or span.

like image 116
Reza Avatar answered Sep 30 '22 12:09

Reza