Html 我可以在 css 中使用“Arial Rounded MT Bold”吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5512720/
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
Can I use "Arial Rounded MT Bold" with css?
提问by faressoft
Can I use "Arial Rounded MT Bold" with css ?
我可以在 css 中使用“Arial Rounded MT Bold”吗?
font-family:"Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
Nothing Changed when I put :
当我放置时什么都没有改变:
font-family:Arial, Helvetica, sans-serif;
回答by Kent Brewster
Google Fonts has Nunito, by Vernon Adams:
Google Fonts 有 Nunito,作者是 Vernon Adams:
http://www.google.com/webfonts/family?family=Nunito
http://www.google.com/webfonts/family?family=Nunito
It's nice and rounded; sort of reminds me of what they're using on Glitch.
它漂亮而圆润;有点让我想起他们在 Glitch 上使用的东西。
回答by Molomby
It's hard to know without more information from the OP but I've seen these same symptoms caused by the hardware acceleration feature in Firefox. It's been know to cause several problems with font rendering. One I've observed is failing to render a non-standard font (such as "Arial MT Rounded Bold") despite it being present on the client machine.
如果没有来自 OP 的更多信息,很难知道,但我已经看到了由 Firefox 中的硬件加速功能引起的相同症状。众所周知,字体渲染会导致一些问题。我观察到的一个问题是,尽管客户端计算机上存在非标准字体(例如“Arial MT Rounded Bold”),但它无法呈现。
For example, this page...
例如,这个页面...
<html>
<head>
<style type="text/css">
body { font-family: "Arial Rounded MT Bold"; font-size: 30px; }
</style>
</head>
<body>
This can be really annoying.
</body>
</html>
When viewed in IE, Chrome or FF with hardware acceleration turned off the font appears correctly, like this...
在关闭硬件加速的 IE、Chrome 或 FF 中查看时,字体显示正确,如下所示...
But when viewed in FF with hardware acceleration enabled the browser fails to "find" the specified font so it defaults to another, like this...
但是当在启用硬件加速的 FF 中查看时,浏览器无法“找到”指定的字体,因此它默认为另一种字体,就像这样......
There have been issues with this "feature" of FF since version 4.
自版本 4 以来,FF 的此“功能”一直存在问题。
Probably the best solution is to either use a different (standard) font or (as Kent suggests) find a similar web font that will work in all modern browsers. Alternatively, like many font issues, the problem can be mitigated by supplying a list of font families to use as fall-backs.
可能最好的解决方案是使用不同的(标准)字体或(如 Kent 建议的)找到一种适用于所有现代浏览器的类似网络字体。或者,与许多字体问题一样,可以通过提供用作后备的字体系列列表来缓解该问题。
回答by rtpHarry
I've seen an alternative Google Font suggested here from back in 2011 which is a pretty good match but there are some thin parts to the font which aren't the same as the Arial Rounded MT Bold.
我在 2011 年看到这里建议的替代 Google 字体,这是一个非常好的匹配,但字体有一些薄的部分与 Arial Rounded MT Bold 不同。
For people still looking for an alternative I think this one is a better match; its called Varela Round by Joe Prince:
对于仍在寻找替代方案的人,我认为这是一个更好的匹配;它被 Joe Prince 称为 Varela Round:
I would also set it in font-weight: bold;
for a more accurate match.
我也会将其设置font-weight: bold;
为更准确的匹配。
回答by Bojangles
To use custom fonts with good cross browser compatibility, take a look at FontSquirrel. They will generate the correct CSS to get custom fonts working cross browser. Take a look around their site for Rounded MT Bold or whatever else you want :-) Also, if you want more fonts, take a look at http://www.fontex.org/
要使用具有良好跨浏览器兼容性的自定义字体,请查看FontSquirrel。他们将生成正确的 CSS 以获得跨浏览器工作的自定义字体。看看他们的网站,看看 Rounded MT Bold 或其他任何你想要的 :-) 另外,如果你想要更多的字体,看看http://www.fontex.org/
回答by strauberry
Google Fontsis also a possibility. There are a lot of different fonts but I don't know whether there's exactly Arial Rounded MT Bold.
谷歌字体也是一种可能。有很多不同的字体,但我不知道是否确实有 Arial Rounded MT Bold。
You can use only fonts which are installed at the clients computer!! So just mentioning them in the css font-family doesn't work if the font is not installed. For this, Google Fonts and others bring the functionality... so everytime you use a font that is not "Times", "Arial" or "Verdana", which are installed on nearly every computer, you should think about an alternative to raw css
您只能使用安装在客户端计算机上的字体!!因此,如果未安装字体,仅在 css font-family 中提及它们将不起作用。为此,Google Fonts 和其他字体提供了该功能……因此,每次您使用的字体不是“Times”、“Arial”或“Verdana”(几乎每台计算机上都安装了这些字体)时,您应该考虑替代原始字体css
回答by charliepark
There's a good chance that — if nothing changed (on your local browser's rendering of the webpage) when you changed the font stack — that you don't actually have Arial MT Rounded Bold installed on your computer. One way to test this is to use Firebug, to 'inspect element' for the headline (or whatever the font is applied to), and to edit the font-family listing in the right-hand Firebug pane. (Usually, I just find the named font and add a space into the name of it, which "breaks" the call to the proper font, and the browser then moves on to the next font in the stack.)
如果更改字体堆栈时没有任何更改(在您的本地浏览器呈现的网页上),很有可能您的计算机上实际上没有安装 Arial MT Rounded Bold。测试这一点的一种方法是使用 Firebug,“检查元素”的标题(或任何应用的字体),并在右侧的 Firebug 窗格中编辑字体系列列表。(通常,我只是找到命名字体并在它的名称中添加一个空格,这会“中断”对正确字体的调用,然后浏览器移至堆栈中的下一个字体。)
Other options include using Google's web-font Nunito (as Kent Brewster recommended a few minutes ago), or setting up a font-face font on your own server, providing one of the rounded fonts (RockoFLF Bold, FF Din Rounded, Nunito, and Arial MT Rounded Bold are all options). (Technically, per Kent's comment, Glitch is using RockoFLF, with Arial MT Rounded Bold as the second font in the stack. At least, that's what they were doing a few months ago when I last looked at their code. ... Oh ... just checked again, and they've dropped the Arial MT Rounded Bold out of the stack. They're calling RockoFLF with an embedded font-face.)
其他选项包括使用 Google 的网络字体 Nunito(正如 Kent Brewster 几分钟前推荐的那样),或在您自己的服务器上设置字体字体,提供一种圆形字体(RockoFLF Bold、FF Din Rounded、Nunito 和Arial MT Rounded Bold 都是选项)。(从技术上讲,根据 Kent 的评论,Glitch 使用的是 RockoFLF,其中 Arial MT Rounded Bold 作为堆栈中的第二个字体。至少,几个月前我上次查看他们的代码时,他们就是这样做的。......哦。 .. 再次检查,他们已经将 Arial MT Rounded Bold 从堆栈中删除了。他们使用嵌入的字体调用 RockoFLF。)
Anyway, as Kent Brewster noted, I think your best bet is to use Google Web Fonts' 'Nunito', if you aren't sure that it'll be on your users' computers (or even your own).
无论如何,正如 Kent Brewster 指出的那样,我认为最好的办法是使用 Google Web Fonts 的“Nunito”,如果您不确定它是否会在您用户的计算机(甚至您自己的计算机)上。
回答by Brianna Hayley
It may not appear because of system compatibility - you can check out Arial Rounded MT Bold on CSS Font Stack for compatibility. There's a 59.53% on Windows and 95.14% on Mac. https://www.cssfontstack.com/Arial-Rounded-MT-Bold
由于系统兼容性,它可能不会出现 - 您可以查看 CSS 字体堆栈上的 Arial Rounded MT Bold 以了解兼容性。Windows 上为 59.53%,Mac 上为 95.14%。https://www.cssfontstack.com/Arial-Rounded-MT-Bold
回答by Antony
Its worth noting that Linux doesn't come with Arial by default so one should not rely on a font being present on a users computer. Instead they should download the files (license permitting), host them on their site and link to them using @font-face.
值得注意的是,Linux 默认不附带 Arial,因此不应依赖用户计算机上存在的字体。相反,他们应该下载文件(许可许可),将它们托管在他们的网站上并使用@font-face 链接到它们。