草庐IT

html - 将@font-face 与嵌入在当前 HTML 页面中的 SVG 字体一起使用

我有一个要分发的独立HTML文档,没有任何外部依赖项。我在本文档中使用了只有我的一些用户会安装的非标准字体。对于那些没有安装字体的用户,我在顶部的嵌入式SVG文档中包含了一份字体副本。.(我在这个例子中使用的是单字形字体,真实文档使用的是完整的字体。)SVG字体看起来不如普通字体好看,所以我只想在本地没有安装字体的情况下使用SVG字体。如果字体是在外部SVG文档中定义的,我可以以低于本地安装字体的优先级使用它,如下所示:(fiddle)@font-face{font-family:"MyFont";src:local("MyFont"),url("fonts.svg#MyFontEle

html - 使用 CSS @font-face 时,浏览器以什么顺序使用不同的类型?

当在CSS中使用@font-face时,是否在任何地方记录了每种主要浏览器的字体类型,以及如果缺少一种或多种字体类型,它们赋予不同字体类型的优先级?我尝试用谷歌搜索答案,但失败了。@font-face{font-family:'myfont';src:url('myfont.eot');src:url('myfont.eot?#iefix')format('embedded-opentype'),url('myfont.woff')format('woff'),url('myfont.ttf')format('truetype'),url('myfont.svg#myfont')for

html - 仅加载该页面中使用的@font-face

我的样式表中有多个@font-face字体,有没有办法只加载该页面上使用的字体?除了为具有该字体的每个页面加载单独的样式表之外。 最佳答案 我不知道浏览器是如何真正实现它的,但是CSSFontsModuleLevel3在其“Fontloadingguidelines”部分中说,浏览器必须只下载当前页面中使用的字体:The@font-faceruleisdesignedtoallowlazyloadingoffonts,fontsareonlydownloadedwhenneededforusewithinadocument.Asty

html - 使用 Entypo @font-face 在 IE8 或更高版本中不起作用?

我刚开始使用Entypofont-face来制作我的社交图标,但在IE8或更高版本中,它将字体显示为一个空框。不知道是我的代码有问题还是他们的字体有问题。@font-face{font-family:'entypo-social';src:url('entypo-social.eot');src:url('entypo-social.eot?#iefix')format('embedded-opentype'),url('entypo-social.woff')format('woff'),url('entypo-social.ttf')format('truetype'),url('

html - css font-face 不适用于@fonsquirrel

我的css文件中有这段代码来自@fontsquirrel生成器:///将代码更改为现在的样子///@font-face{font-family:'AdLibRegular';src:url('../fonts/adlib-webfont.eot');src:local('☺'),url('../fonts/adlib-webfont.woff')format('woff'),url('../fonts/adlib-webfont.ttf')format('truetype'),url('../fonts/adlib-webfont.svg#webfontmAc00Ivp')format

html - @font-face 是否适用于所有浏览器?

@font-face是否适用于所有浏览器?如何使用@font-face? 最佳答案 checkout:@font-facebrowsersupportWebkit/Safari从3.1版开始字体格式:TrueType/OpenTypeTT(.ttf)OpenTypePS(.otf)SafariMobile(iPhone/iPad):仅SVG字体更多信息:http://webkit.org/blog/124/downloadable-fonts/维基:代码示例歌剧自从歌剧10:http://www.opera.com/browser/

html - 在 Chrome 中 @font-face local() 找不到本地字体

GoogleChrome不使用本地系统的字体而是从服务器下载,但Firefox从本地系统正确使用它。AsIcanseeinDevTools,thefontwasdownloadedfromtheserver:DevTools->Computed->RenderedFonts[img]IntheFirefoxIcansee,thatweuselocalfont:FirefoxTools->Fonts[img]@font-face{font-family:'Calibri';src:local(CalibriItalic),local(Calibri-Italic),url('../fon

javascript - 即时添加@font-face

我有JavaScriptFileReader和/或CSS@font-face的问题(或者它可能是HTMLDOM问题-不确定)。在HTML5拖放的帮助下,我从桌面拖动一个字体文件并将其放入浏览器窗口,然后接收File对象并尝试处理它。这是执行此操作的JavaScript代码://gettingtheFileobjectvarfile=e.dataTransfer.files[0];varreader=newFileReader();reader.onload=function(event){varcontents=event.target.result;//mostimportantth

html - 无法使用 Internet Explorer 8 获取@font-face

我无法让我客户的自定义字体显示在IE8中。它出现在IE9&7和Chromeobv中。我不确定为什么这个版本的IE会造成麻烦。这是我的html中的include语句这是cherokee_ie.css文件@font-face{font-family:'cherokee';src:url('../../custom.eot');src:url('../../custom.eot')format('embedded-opentype'),src:local('☺'),url('../../font/custom.woff')format('woff'),url('../../font/cust

html - @Font-face 不能在手机上工作

这是我的代码,它在台式机和平板电脑上运行良好,但在移动设备上运行不佳。是代码还是做一些字体在移动设备上不起作用@font-face{font-family:'Out';src:url('http://location/Outstanding.otf');} 最佳答案 您需要将所有需要的src添加到@font-face中,就像这个例子:@font-face{font-family:'MyWebFont';src:url('webfont.eot');/*IE9CompatModes*/src:url('webfont.eot?#ief