I want to change font family in a phonegap project.
Means that user be able to change font family in the setting by select the arbitrary font.
How can i do it?
Thanks in Advance
Edit: Seems it doesn't work.this is my jquery code:
$("#font-selector").change(function(){
$(".size").css("font-family",$("#font-selector").val());
});
And html code is:
<select name="changeFont" id="font-selector" onchange='$("body").attr("data-font", $("#font-selector").val())'>
<option value="my font">my font</option>
<option value="my font">my font</option>
And css code is:
@font-face {
font-family: 'my font';
src: url('my font.eot');
src: url('my font.eot?#iefix') format('embedded-opentype'),
url('my font.woff2') format('woff2'),
url('my font.woff') format('woff'),
url('my font.ttf') format('truetype'),
url('my font.svg#my font') format('svg');
font-weight: normal;
font-style: normal;
Where is the problem?