Date: 04/14/10 (C Sharp) Keywords: css, web, google I'm getting very frustrated with trying to generate text on images in .Net. Whilst the process to do so is pretty simple, the results one gets simply aren't that satisfactory. I have the following code (really very simple, as you can see) in an IHttpHandler, which I call in a loop to iterate through some of the fonts on my system as a proof-of-concept:
So far so good. It does almost exactly what I'd expect it to. But the images it generates are, frankly, shit. The following image is a screengrab of me running this locally (in Google Chrome, not that that matters), with the images on the left and the font name on the right (using CSS to cause it to be in the same size and font as the image):
So why is GDI+ generating the text bolder (darker) than it should be. I understand that it won't necessarily be as beautiful as the ClearType-rendered text, but the weight of the font is just damn wrong! So how do I get GDI+ to play ball? Anyone? If you don't want to leave thoughts as a comment on here, feel free to email me (owen dot blacker at iris hyphen digital dot com). Cross-posted to owenblacker and ms_dot_net.
|