Wingdings font family does not seem to work on Fir

2019-01-23 10:55发布

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

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

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

6条回答
女痞
2楼-- · 2019-01-23 11:12

The Wingdings characters can be accessed in a Unicode-compliant manner, via the "Private Use Area" (codepoints U+E000 to 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+F021 to U+F0FF.

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

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

查看更多
劫难
3楼-- · 2019-01-23 11:16

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.

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

查看更多
Emotional °昔
4楼-- · 2019-01-23 11:19
@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/

simple solution in your HTML

<style type="text/css">
@font-face {
    font-family: "Ace Crikey";
    src: url(ace.ttf);
}
.ace {
    font-family: "Ace Crikey";
    font-size: 230%;
}
</style>
查看更多
够拽才男人
5楼-- · 2019-01-23 11:19

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

查看更多
女痞
6楼-- · 2019-01-23 11:26

You could use unicode characters such as

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

查看更多
放荡不羁爱自由
7楼-- · 2019-01-23 11:27

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.

However, do not despair, most symbols are available in Unicode : check 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.

查看更多
登录 后发表回答