English 中文(简体)
正在通过 @font-face 获取自定义字体使用私密代码点的 IE
原标题:Getting IE to use private code points in custom font via @font-face

我试图使用我们在 Glyphs 中创建的自定义字体。 它在某些情景下运作良好, 在其它情景下完全不起作用 。

我用FontSquirrel从由 Glyphs 导出的一个 Otf 中创建非 Otf 字体文件( 除非我使用TypeFront, 它为我创建/ 主持它们) 。 我创建的字符是在 Unicode 私人使用区域, 特别是此范围内 : < a href=" http://www. decodeunicounicode. org/en/ public_use_reare/5" rel="nofollow" > http://www.decodeunicode.org/en/ public_use_rea/5

Here s what is working: * The font in Firefox and Safari * The font in Chrome if I include the opentype font file in CSS.

这里的破碎之处是:

  • The font renders blank, in Chrome, if I do not include the opentype font file in CSS.
  • The font renders empty boxes, in IE8/9, under any circumstance. (Haven t checked older versions.)

以下是我未成功尝试过的:

  • 本地端主机字体。 在 Flont 类型上主机字体 。

  • 最新的防弹字面声明,由FontSquirrel和Friont TypeFront提供。

ex :

@font-face {
    font-family:  dojofore ;
    src: url( ash/oah/css/dojofore-regular-webfont.eot );
    src: url( /ash/oah/css/dojofore-regular-webfont.eot?#iefix ) format( embedded-opentype ),                  
         url( /ash/oah/css/dojofore-regular-webfont.ttf ) format( truetype ),
         url( /ash/oah/css/dojofore-regular-webfont.woff ) format( woff ),
         url( /ash/oah/css/dojofore-regular-webfont.svg#dojoforeRegular ) format( svg );
    font-weight: normal;
    font-style: normal;
}
  • 仅使用上面的第一道弧形声明。 只有第二条, 只有第二条第一行。

  • 更改. httaccess 文件 :

    AddType application/vnd.ms-fontobject .eot
    AddType font/ttf .ttf
    AddType font/otf .otf
    

我觉得我必须错过一些关键步骤,使上述工作在每个浏览器中都做得漂亮。 其他人已经做到了( FontAweomes 字体存在于私人使用区域 ) 。 有人能告诉我我做错了什么吗?

最佳回答

解决了

FontSquirrel 允许您“ subset” 您的字体。 这样做似乎可以让 Unicode 的私人区域更可预测。 在这种情况下, 这意味着给它一个范围 E400- E500 。

问题回答

暂无回答




相关问题
Why are there duplicate characters in Unicode?

I can see some duplicate characters in Unicode. For example, the character C can be represented by the code points U+0043 and U+0421. Why is this so?

how to extract characters from a Korean string in VBA

Need to extract the initial character from a Korean word in MS-Excel and MS-Access. When I use Left("한글",1) it will return the first syllable i.e 한, what I need is the initial character i.e ㅎ . Is ...

File open error by using codec utf-8 in python

I execute following code on windows xp and python 2.6.4 But it show IOError. How to open file whose name has utf-8 codec. >>> open( unicode( 한글.txt , euc-kr ).encode( utf-8 ) ) Traceback ...

UnicodeEncodeError on MySQL insert in Python

I used lxml to parse some web page as below: >>> doc = lxml.html.fromstring(htmldata) >>> element in doc.cssselect(sometag)[0] >>> text = element.text_content() >>>...

Fast way to filter illegal xml unicode chars in python?

The XML specification lists a bunch of Unicode characters that are either illegal or "discouraged". Given a string, how can I remove all illegal characters from it? I came up with the following ...

热门标签