您的 css 中可能没有其他字体的 @font-face 声明。我猜你只有一张 Droid Sans 的。每种字体都需要一个。例如,在你的 css 中你应该有:
@font-face {
font-family: 'DroidSans';
src: url('font/DroidSans-webfont.eot?') format('eot'),
url('font/DroidSans-webfont.woff') format('woff'),
url('font/DroidSans-webfont.ttf') format('truetype'),
url('font/DroidSans-webfont.svg#webfontw7zqO19G') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'DroidSansMono';
src: url('font/DroidSans-Mono-webfont.eot?') format('eot'),
url('font/DroidSans-Mono-webfont.woff') format('woff'),
url('font/DroidSans-Mono-webfont.ttf') format('truetype'),
url('font/DroidSans-Mono-webfont.svg#webfontSOhoM6aS') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'DroidSerif';
src: url('font/DroidSerif-webfont.eot?') format('eot'),
url('font/DroidSerif-webfont.woff') format('woff'),
url('font/DroidSerif-webfont.ttf') format('truetype'),
url('font/DroidSerif-webfont.svg#webfontw7zqO19G') format('svg');
font-weight: normal;
font-style: normal;
}
然后在您的代码中,您的 font-family 应该与您在上面的 css 中声明的相同(即 font-family: 'Droid Sans'; 与 font-family: 'DroidSans' 不同)
<p style='font-family: "DroidSans",sans-serif;'>vând whisky și tequila, preț fix.</p>
<p style='font-family: "DroidSansMono",monospace;'>vând whisky și tequila, preț fix.</p>
<p style='font-family: "DroidSerif",serif;'>vând whisky și tequila, preț fix.</p>
尝试一下,看看你进展如何。