Tag: font face

字体文件不与ASP.NET Bundle一起加载

在我的ASP.NET MVC应用程序中,我使用Bundles来压缩css和js文件。 问题是 – 我启用优化模式后,字体不加载。 BundleTable.EnableOptimizations = true; 这是C#代码 public static void RegisterBundles(BundleCollection bundles) { RegisterStyles(bundles); BundleTable.EnableOptimizations = true; } private static void RegisterStyles(BundleCollection bundles) { bundles.Add(new StyleBundle("~/BundleStyles/css").Include( "~/Content/Styles/bootstrap/bootstrap.css", "~/Content/Styles/reset.css", "~/Content/Styles/gridpack/gridpack.css", "~/Content/Styles/fontFaces.css", "~/Content/Styles/icons.css", "~/Content/Styles/inputs.css", "~/Content/Styles/common.css", "~/Content/Styles/header.css", "~/Content/Styles/footer.css", "~/Content/Styles/cslider/slider-animations.css", "~/Content/Styles/cslider/slider-base.css")); } 这里是字体的CSS。 @font-face { font-family: ProximaNova; src: url('../Fonts/ProximaNova/ProximaNova-Bold.otf') format('opentype'); font-weight: bold; font-style: normal; } 这是CSS在页面中被引用的方式。 <link […]

@ font-face EOT不通过HTTPS加载

概要 我在IE 7,8,9上使用@ font-face通过HTTPS遇到了一个问题 – 它只是不加载。 包含HTML页面是否托pipe在HTTPS上并不重要, 当我尝试通过HTTP载入EOT字体时,HTTPS不会 。 有没有人看过这种行为? 托pipe字体的服务器发送正确的content-type =“application / vnd.ms-fontobject” 我已经尝试了多种字体,所以它不是特定于字体的。 字体是在字体松鼠生成的 CSS语法 @font-face { font-family: 'GothamCondensedBold'; src:url('path/to/fontgothmbcd-webfont.eot'); src:url('path/to/fontgothmbcd-webfont.eot?#iefix') format('embedded-opentype'), url('path/to/fontgothmbcd-webfont.woff') format('woff'), url('path/to/fontgothmbcd-webfont.ttf') format('truetype'), url('path/to/fontgothmbcd-webfont.svg#GothamCondensedBold') format('svg'); font-weight: normal; font-style: normal; } 示例页面 http://gregnettles.net/dev/font-face-test.html

在CSS中使用多个@ font-face规则

如何在我的CSS中使用超过@font-face规则? 我已经插入到我的样式表中: body { background: #fff url(..http://img.dovov.combody-bg-corporate.gif) repeat-x; padding-bottom: 10px; font-family: 'GestaRegular', Arial, Helvetica, sans-serif; } @font-face { font-family: 'GestaReFogular'; src: url('gestareg-webfont.eot'); src: local('☺'), url('gestareg-webfont.woff') format('woff'), url('gestareg-webfont.ttf') format('truetype'), url('gestareg-webfont.svg#webfontg8dbVmxj') format('svg'); } 目前这只适用于网站上的整个文本。 但是,我想指定h1使用不同的字体。 我怎样才能做到这一点?

使用@ font-face使用多个自定义字体?

我确定我错过了一些非常简单的事情。 一直使用正常字体的单个自定义字体: @font-face { font-family: CustomFont; src: url('CustomFont.ttf'); } 所有工作正常,当我使用它,但如果我想添加另一个自定义字体,我该怎么办? 我试着用逗号分隔下一个或添加一个完整的其他字体,但不能得到第二个字体的工作。

使用CSS将单个字体应用于整个网站

我想在整个网站上使用一个名为“Algerian”的字体。 所以,我需要改变所有的HTML标签,我不想为不同的标签写不同的代码,例如: button{font-family:Algerian;} div{font-family:Algerian;} 下面写的方法也是非常不鼓励的: div,button,span,strong{font-family:Algerian;}

如何知道一个字体(@ font-face)是否已经被加载?

我正在使用Font-Awesome,但是当字体文件没有加载时,图标就会以显示。 所以,我想这些图标有display:none文件没有加载。 @font-face { font-family: "FontAwesome"; src: url('../font/fontawesome-webfont.eot'); src: url('../font/fontawesome-webfont.eot?#iefix') format('eot'), url('../font/fontawesome-webfont.woff') format('woff'), url('../font/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svg#FontAwesome') format('svg'); font-weight: normal; font-style: normal; } 我怎么知道这些文件已经加载,我终于能够显示图标? 编辑:我不是说当页面加载(onload),因为字体可以加载整个页面之前。

右mimetypes为embedded字体的SVG图像

这是通常的SVG mimetypes: image/svg+xml 它运作良好。 但是,在embeddedSVG字体时,chrome告诉你mimetypes不正确,显然是因为你返回了一个字体而不是图像。 有没有任何通用的MIMEtypes? 是铬错了? application/svg+xml接受不知何故? 我想这仍然是HTML5中的一个灰色区域,但有人可能知道。

CSS“x”closuresbutton的哪种字体?

我只想使用CSS创build一个closuresbutton。 我确定我不是第一个这样做的人,所以有人知道哪个字体的宽度和高度相同,所以可以用跨浏览器来看起来像是closuresbutton吗?

在Web浏览器上使用.otf字体

我在一个需要在线字体testing的网站上工作,我拥有的字体都是.otf 有没有一种方法来embedded字体,让他们在所有的浏览器上工作? 如果没有,我还有什么其他的select?

为什么@ font-face在woff文件上抛出404错误?

我在公司的网站上使用了@font-face ,它看起来很棒。 除了Firefox和Chrome会在.woff文件上引发404错误。 IE不会抛出错误。 我有位于根目录的字体,但我已经试过在CSS文件夹中的字体,甚至给整个url的字体。 如果从我的CSS文件中删除这些字体,我不会得到一个404,所以我知道这不是一个语法错误。 另外,我使用了fontsquirrels工具来创build@font-face字体和代码: @font-face { font-family: 'LaurenCBrownRegular'; src: url('/laurencb-webfont.eot'); src: local('☺'), url('/laurencb-webfont.woff') format('woff'), url('/laurencb-webfont.ttf') format('truetype'), url('/laurencb-webfont.svg#webfontaaFhOfws') format('svg'); font-weight: normal; font-style: normal; } @font-face { font-family: 'FontinSansRegular'; src: url('/fontin_sans_r_45b-webfont.eot'); src: local('☺'), url('/fontin_sans_r_45b-webfont.woff') format('woff'), url('/fontin_sans_r_45b-webfont.ttf') format('truetype'), url('/fontin_sans_r_45b-webfont.svg#webfontKJHTwWCi') format('svg'); font-weight: normal; font-style: normal; }