What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

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://files.otac0n.com/StackOverflowFlair.zip

EDIT:

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?

share|improve this question
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 Jan 31 '10 at 20:09
    
I hadn't noticed my flair was !@#& but thanks, I'll fix it :-) –  Chris W. Rea Feb 1 '10 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 ;-) –  Chris W. Rea Feb 1 '10 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. –  Chris W. Rea Feb 1 '10 at 18:27
    
@BasicallyMoney.com: I can see that it is fixed now, but it may take a while for my caches to expire. –  John Gietzen Feb 1 '10 at 18:27
    
Can we get the source code? The link given below does not work. –  Immortal Mar 21 '10 at 19:15
    
@Immortal: files.otac0n.com/StackOverflowFlair.zip Sorry, my link was wrong. –  John Gietzen Mar 25 '10 at 11:52

3 Answers 3

Anti-aliasing please:

graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; 
// or TextRenderingHint.ClearTypeGridFit
share|improve this answer
    
That has been done from the beginning. However, this is running on a virtual IIS server. –  John Gietzen Feb 1 '10 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. –  John Gietzen Feb 1 '10 at 18:25
    
@John: try setting the rendering hint explicitly (see my edit) –  Shog9 Feb 1 '10 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. –  John Gietzen Feb 1 '10 at 18:49
1  
@John: Sounds like a good Stack Overflow question! –  LeakyCode Feb 1 '10 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... –  John Gietzen Feb 1 '10 at 21:40
1  
Does that look better? –  John Gietzen Feb 4 '10 at 19:28
    
@John: I believe so. –  LeakyCode Feb 4 '10 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

share|improve this answer
1  
AH! \d+ gold badges will not match 1 gold badge. I will fix it when I get home. –  John Gietzen Feb 1 '10 at 17:19
    
Actually: Done, I fixed that from here. –  John Gietzen Feb 1 '10 at 17:27
1  
surely the simplest solution would have been for you to get another gold badge? –  Rich Seller Feb 1 '10 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. –  Robert Cartaino Feb 1 '10 at 18:11
    
That's the spirit –  Rich Seller Feb 1 '10 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?

share|improve this answer
    
Yeah, I have it hosted at files.otacon.com/StackOverflowFlair.zip However, I'm currently trying to get Jeff to add it to the base product. –  John Gietzen Feb 5 '10 at 3:51
    
Sorry, that's files.otac0n.com/StackOverflowFlair.zip –  John Gietzen Mar 25 '10 at 11:49

You must log in to answer this question.

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