Roboto font in Chrome is not shown properly

强颜欢笑 提交于 2019-12-03 12:05:27

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..

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.

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.

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.

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.

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.

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.

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

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

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