Roboto font in Chrome is not shown properly

拜拜、爱过 提交于 2019-12-04 18:49:31

问题


I've been working for a client site and I have problem with rendering of Roboto font.

In Chrome (ver. 43.0.2357.65 m) all the various weights of Roboto looks same. Here is the example: Left is Mozilla Firefox, right is Chrome http://i.stack.imgur.com/dX4Lx.jpg

Do you have any idea what's wrong with it?

thank you


回答1:


Well, it's such a shame, but I have had old version of Roboto installed on my PC.
Since I deleted, everything works fine again.

I should facepalm myself hard..




回答2:


I have the same version and it's work.

Try to include font in CSS with this code

@import url(http://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300,100italic,100);

body {
   font-family: 'Roboto', sans-serif;
}

And set the font-weight: 300; for exemple and see if that works.




回答3:


If you use @fontface evert browser use different font format so the complete css is like this:

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

But as suggested using google fonts you should have no problems.




回答4:


I had a similar issue. I noticed that all periods are square, not circle. Download a fresh copy of Roboto font here and reinstall it on your machine.




回答5:


I had the same issue, for me what worked was calibrating my monitors and:

  1. Go to chrome://flags/
  2. Accelerated 2D canvas -> Enable
  3. 2D canvas -> Enable Reboot Chrome.



回答6:


In my case, for a Hebrew site, the font-weight was set to 900 and the output was showing differently in Firefox and Chrome browsers even though I followed Google-Font's embedding rules properly:

//For example:
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700,900" rel="stylesheet"> 

Solution: I have just updated the font-weight to 700 instead of 900 and this fixed the issue.




回答7:


If you are using Adobe's Creative Cloud and you have Roboto set as a font, you may run into issues where all things in Chrome then get Roboto Bold. I disabled the font from Adobe Fonts and it fixed my issue, but in some Google products like GMAIL, Sans Serif is bolded and you can't turn off the bold. I don't know why and I can't find any good information on how to resolve that.




回答8:


https://stackoverflow.com/a/27383566/11417534 fixed this problem for me.

Just delete the protocol declaration (http:// or https://) from the font request.



来源:https://stackoverflow.com/questions/30476265/roboto-font-in-chrome-is-not-shown-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!