混合移动应用程序(电话差距)UI中的自定义字体 [英] Custom fonts in hybrid mobile app (phone gap) UI

查看:146
本文介绍了混合移动应用程序(电话差距)UI中的自定义字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用@ font-face规则,在我的第一个混合移动应用程序(电话中)中使用了一些自定义字体。具有不同扩展名的字体文件打包应用程序,并使用CSS调用它们。它完美呈现。

但是怀疑这个方法,想知道这是一个正确的方法吗?请指导我。

谢谢!

解决方案

使用科尔多瓦和这种方法一段时间了,从来没有遇到过问题。假设这就是你正在做的...

  @ font-face 
{
字体-family:dinpro_black;
src:url('../ fonts / DINPro Black.otf');
}

.font_black {
font-family:dinpro_black;
}


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!

解决方案

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;
}

这篇关于混合移动应用程序(电话差距)UI中的自定义字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆