Html Wingdings 字体系列似乎不适用于 Firefox 和 Opera

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7862569/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 11:12:43  来源:igfitidea点击:

Wingdings font family does not seem to work on Firefox and Opera

htmlcssfirefoxoperafont-family

提问by niko

I was using the Wingdings font in the CSS for some symbols like a pencil and a home icon.

我在 CSS 中使用 Wingdings 字体作为一些符号,如铅笔和主页图标。

It worked on IE, Chrome and Safari but not in Firefox and Opera. I googled it but did not find any better solution.

它适用于 IE、Chrome 和 Safari,但不适用于 Firefox 和 Opera。我用谷歌搜索,但没有找到更好的解决方案。

Why doesn't it work in Firefox? I do need to use those icons, is there any way to use Wingdings in Firefox?

为什么它在 Firefox 中不起作用?我确实需要使用这些图标,有没有办法在 Firefox 中使用 Wingdings?

回答by mddw

Mozilla and Opera are standard-compiliant. Wingdings is not standard (what a surprise coming from Microsoft) because not mapped to Unicode, and so should never be used on a website.

Mozilla 和 Opera 符合标准。Wingdings 不是标准的(微软出人意料),因为它没有映射到 Unicode,所以永远不应该在网站上使用。

However, do not despair, most symbols are available in Unicode : check http://www.alanwood.net/demos/wingdings.html

但是,不要绝望,大多数符号都可以在 Unicode 中使用:检查http://www.alanwood.net/demos/wingdings.html

Important addendum (october 2014) :As of Unicode v7, released on June 16, 2014, all characters from Webdings and Wingdings have been added to Unicode. See the comment below.

重要附录(2014 年 10 月):2014年 6 月 16 日发布的Unicode v7 开始,Webdings 和 Wingdings 中的所有字符都已添加到 Unicode。请参阅下面的评论。

回答by Joseph Marikle

You could use unicode characters such as

您可以使用 unicode 字符,例如

http://www.fileformat.info/info/unicode/char/270e/index.htm

http://www.fileformat.info/info/unicode/char/270e/index.htm

回答by Christoph Lipka

The Wingdings characters canbe accessed in a Unicode-compliant manner, via the "Private Use Area" (codepoints U+E000to U+F7FF). These character codes are reserved for any font-specific symbols not part of the regular Unicode character set, and indeed Wingdingds maps all of its symbols to the subrange U+F021to U+F0FF.

Wingdings 字符可以通过“私人使用区”(代码U+E000指向U+F7FF)以符合 Unicode 的方式访问。这些字符代码是为不属于常规 Unicode 字符集的任何字体特定符号保留的,实际上 Wingdingds 将其所有符号映射到子范围U+F021U+F0FF.

For instance, the triangular flag, which is mapped to P= 0x50in legacy encoding, can be accessed via U+F050= ?= (HTML) = \F050(CSS).

例如,三角形的标志,它被映射到P=0x50在传统的编码,可以通过访问U+F050= ?= (HTML)= \F050(CSS)。

I'm not sure about other browsers, but it does work in Firefox 12.

我不确定其他浏览器,但它确实适用于 Firefox 12。

回答by orangething

To quote a website:

引用一个网站:

There was an endless debate between the people that said Mozilla should support the symbol font in its default configuration because that is a valuable ability and standards lawyers who said no, because they believe that support violates the HTML standard. So far, the obstructionists have prevailed.

有人说 Mozilla 应该在其默认配置中支持符号字体,因为这是一项宝贵的能力,而标准律师们则对此进行了无休止的争论,他们说不,因为他们认为这种支持违反了 HTML 标准。到目前为止,阻挠者占了上风。

http://hutchinson.belmont.ma.us/tth/Wfonts.html

http://hutchinson.belmont.ma.us/tth/Wfonts.html

回答by Grumpy

@font-face {
  font-family: "Your typeface";
  src: url("type/filename.eot");
  src: local("?"),
    url("type/filename.woff") format("woff"),
    url("type/filename.otf") format("opentype"),
    url("type/filename.svg#filename") format("svg");
  }

more here http://nicewebtype.com/notes/2009/10/30/how-to-use-css-font-face/

更多在这里 http://nicewebtype.com/notes/2009/10/30/how-to-use-css-font-face/

simple solution in your HTML

HTML 中的简单解决方案

<style type="text/css">
@font-face {
    font-family: "Ace Crikey";
    src: url(ace.ttf);
}
.ace {
    font-family: "Ace Crikey";
    font-size: 230%;
}
</style>

回答by Eddy Freddy

You can use Gimp or other graphic-software and make some GIFs of the needed icons from the Wingdings font.

您可以使用 Gimp 或其他图形软件,并从 Wingdings 字体中制作一些所需图标的 GIF。