I am trying to draw some text to a canvas, where the same font is used for all characters, but different font styles are used.
To give an example, let us say I want to draw a string to a canvas, with all vowels in bold and all consonants in regular. I also use different colors, but that is probably irrelevant for the problem I facing.
My approach is to anatomize my string and call DrawText in a loop. In each iteration I first call DrawText with DT_CALCRECT and then without. Else I am using the following flags: DT_SINGLELINE or DT_LEFT or DT_VCENTER
The problem I have is that I end up with:
As one can see the vertical centering performed by DrawText is not the same for bold and regular characters.
Any idea which avenue I should go, to have all characters, whether bold or regular at the same level?