Controlling Text Rendering in GDI +
I have been struggling with rendering text in GDI + for a while. We are dynamically generating header images, but there seems to be a lot in the library. I can set the font, font size and a few other things, but I cannot control the line height or letter spacing.
I built my own class that takes a generated text image, strips out individual lines of text (the settings for each font are hand-coded in the settings files) and assembles them with the line height I want. I have not been able to solve the same problem for letter markup.
Does anyone have a solution for this, or a library (OS or ad) recommendation that permits this?
source to share
I don't know if this would apply to your solution, but in the past, when I needed to make even more complex text and I wanted to have enough flexibility in how it would be displayed, I used this library:
http://www.terrainformatica.com/htmlayout/main.whtm
It's not open source, but it's free ...
Alternatively, I've used bitmap fonts extensively in play space - if you store information like character spacing, etc., it might look exactly like TTF, but you lose the ability to scale it, not contributing some decent artifacts. To better understand this approach, here's a font creation tool:
http://www.angelcode.com/products/bmfont/
Hopefully one of them will give you some help - one will give you control over character spacing and line height, but they also have their limitations.
source to share