解决方案似乎是添加多个
@font-face规则,例如:
@font-face { font-family: "DejaVu Sans"; src: url("fonts/DejaVuSans.ttf");}@font-face { font-family: "DejaVu Sans"; src: url("fonts/DejaVuSans-Bold.ttf"); font-weight: bold;}@font-face { font-family: "DejaVu Sans"; src: url("fonts/DejaVuSans-Oblique.ttf"); font-style: italic, oblique;}@font-face { font-family: "DejaVu Sans"; src: url("fonts/DejaVuSans-BoldOblique.ttf"); font-weight: bold; font-style: italic, oblique;}顺便说一句,似乎Google Chrome浏览器不知道该
format("ttf")参数,因此您可能要跳过这一点。(此答案对于CSS2规范是正确的。CSS3仅允许一种字体样式,而不是逗号分隔的列表。)



