问题
I have used few custom fonts in my first hybrid mobile app (in phonegap) using @font-face rules. Font files with different extension were packing with app and called them using CSS. And it rendered perfectly.
But doubtful on this method and would like to know is this a right approach? Please guide me.
Thanks!
回答1:
I've been using Cordova and that approach for some time now, and never had problems with it. Provided that this is what you're doing...
@font-face
{
font-family: dinpro_black;
src: url('../fonts/DINPro Black.otf');
}
.font_black {
font-family:dinpro_black;
}
回答2:
You are creating an web application in native web view. Web Aplication, so when you using font-face you are using css technology, and is good approach in that kind of apps.
来源:https://stackoverflow.com/questions/28541323/custom-fonts-in-hybrid-mobile-app-phone-gap-ui