Chrome text render bug - css

Examples of text glitch :
If hover on element the glitch is fade out.
I tried all value of -webkit-font-smoothing and text-rendering stop on this one
-webkit-font-smoothing: subpixel-antialiased;
text-rendering: geometricPrecision;
better but don't fix the problem.
font importing like this
#font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
src: local(''),
url('../fonts/inter-v12-latin-900.woff2') format('woff2'),
url('../fonts/inter-v12-latin-900.woff') format('woff'),
url('../fonts/inter-v12-latin-900.ttf') format('truetype'),
url('../fonts/inter-v12-latin-900.eot?#iefix') format('eot'),
url('../fonts/inter-v12-latin-900.svg#Inter') format('svg');
}
hardware acceleration make it better but don't fix it too

Related

Helvetica Font rendering heavy on Chrome

I was trying to use Helvetica font for my next project, but It was rendering heavy on Google Chrome but it was working fine on other browser.
/*...Helvetica.*/
#font-face {
font-family: 'helvetica';
src: url('helvetica/Helvetica.eot');
src: local('?'), url('helvetica/Helvetica.woff') format('woff'), url('helvetica/Helvetica.ttf') format('truetype'), url('helvetica/Helvetica.svg') format('svg');
font-weight: normal;
font-style: normal;
}
Did anyone faced the same problem?
Try using the following code on html/body tag
-webkit-font-smoothing: antialiased !important

#font-face works for one font, not the other

#font-face is driving me bonkers! What else is new?
I have this code in my stylesheet:
#font-face {
font-family: BebasNeue;
src: url('/style/fonts/bebasneue-webfont.svg#bebas_neueregular') format('svg'),
url('/style/fonts/bebasneue-webfont.woff') format('woff'),
url('/style/fonts/bebasneue-webfont.ttf') format ('truetype'),
url('/style/fonts/bebasneue-webfont.eot?#iefix') format('embedded-opentype');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: Quicksand;
src: url('/style/fonts/quicksand-regular-webfont.svg#Quicksand') format('svg'),
url('/style/fonts/quicksand-regular-webfont.woff') format('woff'),
url('/style/fonts/quicksand-regular-webfont.ttf') format('truetype'),
url('/style/fonts/quicksand-regular-webfont.eot?#iefix') format('embedded-opentype');
font-weight: normal;
font-style: normal;
}
Quicksand loads, Bebas does not. I have re-downloaded the font (from Font Squirrel), reconverted it, pulled my hair out, prayed to Odin...
In Chrome's inspector I get an "Invalid CSS property value on the SVG line of the Bebas stylesheet, but I can't see any difference between that and the same line under Quicksand. In both Chrome and FF, quicksand-regular-webfont.woff shows up under resources, but -surprise!- not bebasneue-webfont.woff.
Is it possible that the mistake is here:
src: url('/style/fonts/bebasneue-webfont.svg#bebas_neueregular') format('svg')
and you have to write ...#bebasneue_regular instead?

Font looks distorted in windows

Iam doing a website in ubuntu and finished with UI part. Everything was working smoothly in ubuntu but when i switched on to windows all the fonts are distorted. I tried the following code
#font-face {
font-family: 'garrisonsb';
src: url('../fonts/garrisons-bold.eot');
src: url('../fonts/garrisons-bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/garrisons-bold.woff') format('woff'),
url('../fonts/garrisons-bold.ttf') format('truetype'),
url('../fonts/garrisons-bold.svg#garrison_sansbold') format('svg');
font-weight: bold;
font-style: normal;
}
#font-face {
font-family: 'garrisons';
src: url('../fonts/garrisons-regular.eot');
src: url('../fonts/garrisons-regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/garrisons-regular.woff') format('woff'),
url('../fonts/garrisons-regular.ttf') format('truetype'),
url('../fonts/garrisons-regular.svg#garrison_sansregular') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'rupee';
src: url('../fonts/Rupee.eot');
src: url('../fonts/Rupee.eot?#iefix') format('embedded-opentype'),
url('../fonts/Rupee.woff') format('woff'),
url('../fonts/Rupee.ttf') format('truetype'),
url('../fonts/Rupee.svg#rupeeregular') format('svg');
font-weight: normal;
font-style: normal;
}
the specified code is been generated using squirrel-generator. I tried with font-smooth property set to 'always' and also with -webkit-font-smoothing set to antialiased and the font-weight was also specified as 700 for regular and 900 for bold instead of 'normal', but nothing worked.
please suggest optimum solution......
Web fonts are not smooth in all the browsers. You may have to use -webkit-font-smoothing: antialiased for web-kit browsers.
You better use text-shadow: 0px 0px 1px #GOOD-COLOR-HERE or text-shadow: 0px 0px 1px rgba(COLOR-SETTINGS-HERE) and tweak the color settings and shadow for the best result.
When saying the problem stays within all the browsers it pops the question, is something wrong with your font or maybe something else?
Can you try to do that with another custom font in Windows to see the result?
Though the solution #Madhu Rox provided is pretty cutting edge.

Custom font not appearing correctly on Chrome

I am trying to use a custom font for my website, but it appears wrong in Chrome (latest) and Opera browsers although it appears correctly (smooth) on other browsers. I tried couple of different fonts, with same results on Chrome/Opera.
My code:
#font-face {
font-family: 'mainFont2';
src: url('../fonts/Eurostile.eot');
src: local('☺'), url('../fonts/Eurostile.woff') format('woff'), url('../fonts/Eurostile.ttf') format('truetype'), url('../fonts/Eurostile.svg') format('svg');
font-weight: normal;
font-style: normal;
}
The issue:
Thats just how the browser and OS renders the font..but try to call the .svg format before the .woff format it might fix this.
#font-face {
font-family: 'mainFont2';
src: url('../fonts/Eurostile.eot');
src: local('☺'),
url('../fonts/Eurostile.svg') format('svg'),
url('../fonts/Eurostile.woff') format('woff'),
url('../fonts/Eurostile.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
I'll refer you to this question:
https://stackoverflow.com/a/4060778/1121870
Or try font-smooth:
http://www.w3.org/TR/WD-font/#font-smooth-prop
And there's a nasty little hack here:
http://www.elfboy.com/blog/text-shadow_anti-aliasing/

Why doesn't this #font-face style apply to my HTML?

I am hoping someone can please point out what's not working about this font-face implementation. I've testing this using the body tag so there's no question as to whether the issue is with the HTML (yes, I do have a body tag.)
I have obtained the fonts and the implementation CSS from FontSquirrel. Thanks for looking at this!
CSS:
#font-face {
font-family: 'DymaxionScriptRegular';
src: url('DymaxionScript-webfont.eot');
src: url('DymaxionScript-webfont.eot?#iefix') format('embedded-opentype'),
url('DymaxionScript-webfont.woff') format('woff'),
url('DymaxionScript-webfont.ttf') format('truetype'),
url('DymaxionScript-webfont.svg#DymaxionScriptRegular') format('svg');
font-weight: normal;
font-style: normal;
}
body {
font-family: DymaxionScriptRegular, courier;
}
File tree structure:
Screenshot of Courier fallback font:
Answer: Apparently if one leaves "Regular" off of the font-family declaration, everything works fine. Answered my own question by playing with it.
Real Answer: My first "answer" only worked in Safari. What worked in all of them was changing "'DymaxionScript-webfont..." to '../DymaxionScript-webfont... After I did that, everything worked. It was bad pathing.
Here is a more concise #font-face implementation, that I know works across the board:
#font-face {
font-family: 'DymaxionScriptRegular';
src: url('/path/to/font/webfont.eot?') format('eot'),
url('/path/to/font/webfont.woff') format('woff'),
url('/path/to/font/webfont.ttf') format('truetype'),
url('/path/to/font/webfont.svg#webfont') format('svg');
font-weight:normal;
font-style:normal;
}
For various web fonts you can check out google.com/webfonts which has a bunch of different fonts for use, but you just add a link to google's site and it will return the proper formatting for most browsers as far back as ie6
#font-face {
font-family: 'DymaxionScriptRegular';
src: url('webfont.eot');
src: url('webfont.eot?#iefix') format('embedded-opentype'),
url('webfont.woff') format('woff'),
url('webfont.ttf') format('truetype'),
url('webfont.svg#webfont') format('svg');
font-weight: normal;
font-style: normal;
}
body {
font-family: DymaxionScriptRegular, courier;
}

Resources