How to use custom font in Cordova?

ⅰ亾dé卋堺 提交于 2020-01-07 02:37:05

问题


In cordova I am using the normal font which is written through p tag or h1 tag etc.

I want to write in an stylish font like BROADWAY or CASTELLAR which are available in Microsoft Office and can also be found online as tff file. Is there a way by which I can use any custom font in Cordova.

==>By Custom font I mean any font other than the default font.


回答1:


Yes it is possible.

put these in your .css file:

@face-face {
    font-family: 'font name';
    src: url("font address");
}  

then use font-family: 'font name'; in your css code

Hope this help.



来源:https://stackoverflow.com/questions/42072667/how-to-use-custom-font-in-cordova

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!