私も同じ問題に直面しました。cssファイルをcss
フォルダーに入れました。ttfファイルをフォルダーだけに入れてもwww
正しく機能しなかったので、ttfファイルをcss
フォルダーに移動しました。これが私のコードです:
@font-face
{
font-family: CustomArial;
src: url('arial.ttf');
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
font-family: CustomArial;
}
jquery mobileを使用している場合は、次のようにフォントをオーバーライドする必要があります。
.ui-bar-a, .ui-bar-a input, .ui-bar-a select, .ui-bar-a textarea, .ui-bar-a button {
font-family: CustomArial !important;
}
font-family:Helvetica、Arial、sans-serif;を持つjquery mobileクラスの場合、cssのfont-familyをオーバーライドする必要があります。に
font-family:CustomArial !important;
今それは動作します。あなたはこのように試すことができます、あなたにとってそれは役に立つかもしれません。