Search code examples
htmlcssubuntufontsstylesheet

CSS: Font Problem - Ubuntu Condensed Font doesn't render correctly sometimes


i despair with the following problem for a few weeks now:

I have a stylesheet where i import the "Ubuntu Condensed" Font at the beginning:

@import url("https://fonts.googleapis.com/css?family=Ubuntu+Condensed");

After that i apply it on the body, this way:

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

Now the Problem/Bug(?) comes in .. sometimes (like on every 10-30 page visit) the "Ubuntu Condensed" Font seems to not render correctly (see Screenshot). The lettertype looks completly buggy at the whole page (body) then!

Screenshot of the Problem (wrong VS correct font representation)

After i hit Strg + F5 the problem disappears, til i visit the page again some times.

I've used this font in a other project before and never had this kind of problem.. :( Any ideas?

Thanks a lot! :)

Greetings - Zomboid


Solution

  • Not a real solution but a workaround: consider using google-webfonts-helper. This way you're hosting the fonts yourself. Selfhosting will also render the fonts a tiny bit quicker then getting them from https://fonts.googleapis.com/.