这就是 Firefox 上的输出应该是这样的:
https://www.dropbox.com/s/4uxz6l5po0bkhat/firefox.png?dl=0
但是,Chrome 和 Opera 不会在 Holder.js 对象上使用这种自定义字体。他们是这样渲染的:
https://www.dropbox.com/s/q2i0o6a61lq1hyx/opera-chrome.png?dl=0
这是我的主要 HTML 的头部:
<link rel="stylesheet" type="text/css" href="css/zond.fonts.css" class="holderjs">
<script src="js/holder.min.js"></script>
<script src="js/holder.themes.old.js"></script>
这是我的 holder.js 对象:
<object data-src="holder.js/150x150?theme=zond5&text=Guide to MUN" style="width:150px; height:auto"></object>
这是我的 zond.fonts.css:
@font-face {
font-family:'wf_segoe-ui_normal';
src:url('segoe-ui-west-european-normal.eot');
src:url('segoe-ui-west-european-normal.eot?#iefix') format('embedded-opentype'),
url('segoe-ui-west-european-normal.woff') format('woff'),
url('segoe-ui-west-european-normal.ttf') format('truetype'),
url('segoe-ui-west-european-normal.svg#web') format('svg');
font-weight:normal;
font-style:normal
}
这是我的 holder.themes.old.js:
Holder.addTheme("zond5", {
foreground: "#333",
background: "#f8ff62",
size: 16,
font: "wf_segoe-ui_normal",
fontweight: "normal"
});
问题应该出在哪里?我猜它与CSS字体有关?当我已经包含所有可能的字体类型时,这应该是一个问题吗?