CSS 在 Windows 中使用 Lucida Grande

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4375353/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 23:17:18  来源:igfitidea点击:

using Lucida Grande in windows

cssfonts

提问by Utku Dalmaz

I want to use Lucida Grande in my website for windows.

我想在我的 Windows 网站中使用 Lucida Grande。

How to do that ? how can i embed it to my webpage ?

怎么做 ?我怎样才能将它嵌入到我的网页中?

Thanks

谢谢

回答by roberkules

I'm just looking for the same thing and stumbled upon this article:

我只是在寻找同样的东西,偶然发现了这篇文章:

http://www.brownbatterystudios.com/sixthings/2007/03/14/lucida-hybrid-the-grande-alternative/

http://www.brownbatterystudios.com/sixthings/2007/03/14/lucida-hybrid-the-grande-alternative/

It basically suggests to use Lucida Sans Unicodefor normal text and Lucida Sansfor bold and italic text.

它基本上建议Lucida Sans Unicode用于普通文本以及Lucida Sans粗体和斜体文本。

body {
    font-family: "Lucida Sans Unicode";
}
b, strong, i {
    font-family: "Lucida Sans";
}

the complete code example (including fallback fonts) from the linked site:

来自链接站点的完整代码示例(包括后备字体):

body {
    font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
}

strong, em, b, i {
    font-family: "Lucida Sans", "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
}

回答by Russell Dias

This is the font-stack I've used in the past:

这是我过去使用的字体堆栈:

font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif;

font-family: 'Lucida Grande', Tahoma, Verdana, Arial, sans-serif;

回答by alexandrul

You can try something like this:

你可以尝试这样的事情:

<style type="text/css">
@font-face {
    font-family: "Lucida Grande";
    src: url(/resources/fonts/lucidagrande.ttf);
}
.ace {
    font-family: "Lucida Grande";
    font-size: 90%;
}
</style>

and you should adjust the url used in the src:line and the actual location on disk of the .ttffile (depends on multiple factors: your document root location, or if you use a separate server for static resources, etc).

并且您应该调整src:行中使用的 url和.ttf文件在磁盘上的实际位置(取决于多种因素:您的文档根位置,或者您是否为静态资源使用单独的服务器等)。

回答by thedom

You can try to add Lucida Grande to the font-familytag like this

您可以尝试font-family像这样将 Lucida Grande 添加到标签中

element {
  font-family: "Lucida Grande", Arial, Helvetica, sans-serif;
}

and hope that the user has Lucida Grande installed or read this from W3C: http://www.w3.org/TR/css3-fonts/#font-family0- here they explain how to embed a font (with CSS3)

并希望用户安装了 Lucida Grande 或从 W3C 阅读:http: //www.w3.org/TR/css3-fonts/#font-family0- 他们在这里解释了如何嵌入字体(使用 CSS3)