【发布时间】:2015-03-25 20:12:49
【问题描述】:
注意:它们不是新的。只是“不支持”,不知何故。
我正在尝试为我网站上的元素制作简单的控件,类似于简单的“静音”或“非静音”控件。
但是,我找不到任何能够处理较新的 Unicode 符号的字体,例如损坏的扬声器符号(&#x1F507 到 🔊,或 🔇 到 🔊)(??? ? ???? ???? ????) 即使在 Stack Overflow 上,但仍然 - They can be found in the Unicode character listings 并且能够以某种方式显示在我的 PDF 阅读器和 Internet Explorer 中,但不能显示在 Chrome 中。
从我的角度来看,这是第一段(上图),其中的字符被破坏了:
无论如何,这是我的代码片段。 (出于测试目的,视频控件显示在普通视图中)。实际元素附有z-index: -1000;用作视频背景。
function mute() {
document.getElementById("jsControl").setAttribute ("href", "javascript:unmute()");
document.getElementById("jsControl").innerHTML = "🔈";
document.getElementById("videoPlayer").volume = 0.0
};
function unmute() {
document.getElementById("jsControl").setAttribute ("href", "javascript:mute()");
document.getElementById("jsControl").innerHTML = "🔊";
document.getElementById("videoPlayer").volume = 1.0
};
<html>
<head>
<style>
body {
font-family: [Insert font names and attempts];
}
</style>
</head>
<body>
<video id="videoPlayer" src="..."></video>
<a id="jsControl" href="javascript:unmute()">🔈</a>
</body>
</html>
我尝试了不同的网络安全字体,例如 Arial、Times New Roman 和 Tahoma 以及 Sergoe UI。
问题:是否有任何字体可以支持在 Chrome 上工作的那些 unicode 字符?
(即使是将这些重新映射到常规字母(如 Wingdings)的字体也将被接受,因为它们可以使用 @font-face { ... } 附加。)
另外,请不要抱怨损坏的 Javascript(如果它没有正确编写) - 我可以自己修复。这是字体;我担心的文字(缺少符号)。
更新: 在 Internet Explorer 中查看图标可以正常工作。似乎是 chrome 和/或其他浏览器的问题。
【问题讨论】:
标签: html google-chrome unicode fonts