Skip to content

Instantly share code, notes, and snippets.

@barneycarroll
Created July 26, 2011 10:24
Show Gist options
  • Save barneycarroll/1106451 to your computer and use it in GitHub Desktop.
Save barneycarroll/1106451 to your computer and use it in GitHub Desktop.
Fix bad font anti-aliasing
.background {
background: rgb(247,247,247);
}
.fixText {
text-shadow: 0 0 1px rgba(247,247,247,.5);
}
@fredsterss
Copy link

Boom!

@barneycarroll
Copy link
Author

NB: This no longer works in any browser.
Keeping here for posterity. This hack relied on the fact that some browsers used to deal with text-shadow on a font glyph sub-pixel level. This had a fair bit of instability — Chrome would sometimes fail to render glyphs at all when text-shadow was invoked — and I presume that as a result browsers no longer take it upon themselves to offer their own text rendering and leave it to OS GUI level processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment