Flair as Images

I know, this has been done before.

However, In hopes that we can have this done on a non-hack basis, I have created an implementation that works on ALL STACK EXCHANGE SITES.

Jeff, et al: please consider using this implementation! I would really like an official version.

Jeff Atwood http://otac0n.com/StackOverflow/flair/1.png?theme=dark



Woooo hooo! Completed! Thanks, team.

I have set up a permanent redirect from my site to StackOverflow.com

That means, that everyone using mine should now be using yours automatically, for the main site. It will break for other sites, tho.

Everyone, please update your image links.

Can I get a status-completed flag? Please?

  • 2
    @Robert you use it by embedding the suggested URL format in an img element on your page. John provides an example in his post or you can check the source of the various images. As an aside I think this is a great suggestion!
    – ahsteele
    Commented Jan 31, 2010 at 20:09
  • I hadn't noticed my flair was !@#& but thanks, I'll fix it :-) Commented Feb 1, 2010 at 18:19
  • OK, fixed. Flair wasn't working in the StackExchange beta when I first set that up, and I didn't go back to check in the next version. BTW, thanks for including me on the list above ;-) Commented Feb 1, 2010 at 18:23
  • BTW, looks like the image version above is cached for some amount of time. The real link to the right should show correct if you reload with cache bypass. Commented Feb 1, 2010 at 18:27
  • @BasicallyMoney.com: I can see that it is fixed now, but it may take a while for my caches to expire. Commented Feb 1, 2010 at 18:27
  • Can we get the source code? The link given below does not work.
    – Immortal
    Commented Mar 21, 2010 at 19:15
  • @Immortal: files.otac0n.com/StackOverflowFlair.zip Sorry, my link was wrong. Commented Mar 25, 2010 at 11:52

3 Answers 3


Anti-aliasing please:

graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; 
// or TextRenderingHint.ClearTypeGridFit
  • That has been done from the beginning. However, this is running on a virtual IIS server. Commented Feb 1, 2010 at 18:24
  • Also, if you zoom in, you can see that it is antialiasing. You are asking for "Clear Type", which I can't seem to get GDI+ to do. Commented Feb 1, 2010 at 18:25
  • @John: try setting the rendering hint explicitly (see my edit)
    – Shog9
    Commented Feb 1, 2010 at 18:35
  • Did that too. It all looks great on my dev machine, and all. However, on the server, antialiasing and Unicode are broke. Commented Feb 1, 2010 at 18:49
  • 1
    @John: Sounds like a good Stack Overflow question!
    – mmx
    Commented Feb 1, 2010 at 19:56
  • I'm sure it just has to do with Windows Server's support of ClearType and the fonts that are installd on the box... Commented Feb 1, 2010 at 21:40
  • 1
    Does that look better? Commented Feb 4, 2010 at 19:28
  • @John: I believe so.
    – mmx
    Commented Feb 4, 2010 at 19:42

The Flair-as-Image looks good but my gold badge doesn't appear in your version. See below:

Screen capture from Stack Overflow vs. "Flair as Images: ASP MVC Style":

alt text

Below is the actual linked-png for a "live" comparison to see if it is fixed:

alt text http://otac0n.com/StackOverflow/flair/98786.png?site=stackoverflow.com&theme=default

  • 1
    AH! \d+ gold badges will not match 1 gold badge. I will fix it when I get home. Commented Feb 1, 2010 at 17:19
  • Actually: Done, I fixed that from here. Commented Feb 1, 2010 at 17:27
  • 1
    surely the simplest solution would have been for you to get another gold badge? Commented Feb 1, 2010 at 17:55
  • 2
    @home4film.com - Curse my lazy fingers. I'm off to ask a "Famous Question" which will quickly gather 10,000 views. Be back in 5. Commented Feb 1, 2010 at 18:11
  • That's the spirit Commented Feb 1, 2010 at 19:31

This is really good. I would really like the source code so I could integrate this into Force Close (my StackExchange site). Is there any way I can obtain it?


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .