将您的字体放在PhoneGap www 文件夹下名为“fonts”的目录中。
使用 CSS 包括你的字体,像这样(我在这个例子中使用了 Roboto 字体):
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 400;
src: local('Roboto Condensed Regular'), local('RobotoCondensed-Regular'), url(../fonts/RobotoCondensed-Regular.ttf) format('truetype');
}
无论你想在哪里应用 Roboto 字体,都可以在 css 中这样应用:即
font: 400 1.25em/45px 'Roboto Condensed', sans-serif;
请注意,对于大于 4 的 Android 版本,它可以使用捆绑字体。
但是对于 Android 版本
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'>
希望这会有所帮助..