@fontface Quicksand Light Mac/iPhone/iPad 版

发布于 2025-01-05 09:53:53 字数 1865 浏览 0 评论 0原文

我已经安装了 webkit Quicksand Light 并保存到我的 CSS 文件中,它在 PC 上的所有浏览器中都工作正常,但是当我在 MAC 上的任何浏览器中查看它时,流沙光 Web 字体无法正常显示,就像新罗马字体一样字体类型。是不是没有拾取字体?或者只是没有渲染?

找不到这个问题的任何解决方案,一整天都在尝试修复它

CSS:

@font-face {
font-family: 'QuicksandLight';
src: url('/assets/fonts/Quicksand_Light-webfont.eot');
src: url('/assets/fonts/Quicksand_Light-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light-webfont.svg#QuicksandLight') format('svg');
     /*url('/assets/fonts/Quicksand_Light.otf');*/
font-weight: normal;
font-style: normal;

}

@font-face {
font-family: 'QuicksandLightOblique';
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot');
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: normal;
font-style: normal;

}

@font-face {
font-family: 'QuicksandBook';
src: url('/assets/fonts/Quicksand_Book-webfont.eot');
src: url('/assets/fonts/Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Book-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Book-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;

}

CSS for QuicksandBook;

body
{
 font:13px/24px 'QuicksandBook', Arial,sans-serif;
 font-weight: normal;
 }

这些已在头部部分引用。

i have installed webkit Quicksand Light and book in to my CSS file, its all working fine in all browsers on the PC however when i view it on a MAC in any browser the quicksand light web font doesnt display properly comes out like a times new roman type of font. Is it not picking up the font? or is it just not rendering?

cant find any solutions to this problem, been at it all day trying to fix it

CSS:

@font-face {
font-family: 'QuicksandLight';
src: url('/assets/fonts/Quicksand_Light-webfont.eot');
src: url('/assets/fonts/Quicksand_Light-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light-webfont.svg#QuicksandLight') format('svg');
     /*url('/assets/fonts/Quicksand_Light.otf');*/
font-weight: normal;
font-style: normal;

}

@font-face {
font-family: 'QuicksandLightOblique';
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot');
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: normal;
font-style: normal;

}

@font-face {
font-family: 'QuicksandBook';
src: url('/assets/fonts/Quicksand_Book-webfont.eot');
src: url('/assets/fonts/Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Book-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Book-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;

}

CSS for QuicksandBook;

body
{
 font:13px/24px 'QuicksandBook', Arial,sans-serif;
 font-weight: normal;
 }

these have been referenced in the head section.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

多孤肩上扛 2025-01-12 09:53:53

不幸的是,我没有可供测试的 Mac,但这里列出的一些建议可能值得一试。让我们知道您的进展如何!

http://paulirish.com/2010/font-face-gotchas/#smiley

Unfortunately I don't have a Mac available to test on, but some of the pointers listed here might well be worth a shot. Let us know how you get on!

http://paulirish.com/2010/font-face-gotchas/#smiley

草莓味的萝莉 2025-01-12 09:53:53

我通常将所有字体加载到 css 的最顶部 - 我不知道这是否会产生影响。

另外,为了将来的参考,您可以像这样设置字体:

@font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Light-webfont.eot');
src: url('/assets/fonts/Quicksand_Light-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light-webfont.svg#QuicksandLight') format('svg');
     /*url('/assets/fonts/Quicksand_Light.otf');*/
font-weight: lighter;
font-style: normal;

}

@font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot');
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: lighter;
font-style: italic;

}

@font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Book-webfont.eot');
src: url('/assets/fonts/Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Book-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Book-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;

}

这意味着您可以在 css 中引用字体粗细,而不必将字体设置为倾斜。例如,

body
{
 font: italic lighter 13px/24px 'Quicksand', Arial,sans-serif;
 }

这将以较浅的斜体打印字体

I normally load all of my font's at the very top of my css - I dont know if that makes a difference.

Also for future reference you can do your font's like this:

@font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Light-webfont.eot');
src: url('/assets/fonts/Quicksand_Light-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light-webfont.svg#QuicksandLight') format('svg');
     /*url('/assets/fonts/Quicksand_Light.otf');*/
font-weight: lighter;
font-style: normal;

}

@font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot');
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: lighter;
font-style: italic;

}

@font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Book-webfont.eot');
src: url('/assets/fonts/Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
     url('/assets/fonts/Quicksand_Book-webfont.woff') format('woff'),
     url('/assets/fonts/Quicksand_Book-webfont.ttf') format('truetype'),
     url('/assets/fonts/Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;

}

This means you can reference the font weight in your css rather than having to set the font as oblique. eg

body
{
 font: italic lighter 13px/24px 'Quicksand', Arial,sans-serif;
 }

That will print the font in Italic in the lighter style

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文