views:

822

answers:

1

While generating charts using RS 2008 betas, RC0 and such., I never specified any fonts for axis labels, legends etc. They were all rendered with the Arial font by default, which looked awesome. But as soon as we switched to RS 2008 final, the fonts got all messed up - they are rendered in some kind of bold console font.

My initial thought was that the default changed - I tried setting the font to Arial explicitly (either through RDL or the designer). That didn't work - only certain fonts seem to work (e.g. Calibri). What's even more weird, the legend does not listen to the font setting - it is always rendered in this ugly bold thing. One other thought was maybe the fonts are missing somewhere, however, the Tablix element is using the same fonts and they seem to work.

This behaviour is universal - it is seen using the development studio preview, the report viewing control and while exporting it to all available formats.

So, obviously, I'm stuck - has anyone ever encountered this behaviour ?

A: 

I have seen this behaviour before. Not in SSRS, but in GDI+ rendering in .NET desktop applications. It has to do with antialiasing and palettes that don't support transparency - all the nearly-transparent pixels surrounding the glyphs are coerced to solid colour.

You don't get this effect with post-LCD fonts like Calibri because they are aligned to pixel boundaries for better rendering on LCD displays, which have sharply defined pixels. CRTs allowed colour to bleed into adjacent pixels, producing what was essentially analog antialiasing. (This is why TV pictures look much better than they should considering their horribly low resolution.)

I did find a way around it with GDI, and when I remember I'll tell you. That said, you don't have access to the rendering code so you probably can't apply the fix. Actually I think I've just remembered - you explicitly set the background to white rather than transparent, forcing GDI to composit the edge colours instead of hoping the graphics card will do it. I don't know whether you'll be able to use this answer, sorry.

Peter Wone