I'm trying to write some code to select a bold font (I actually want to get the font filename to send to a cross platform font renderer, but that's not too relevant). I use CreateFont() setting the cWeight to FW_BOLD and pszFaceName to "Arial". I select this font into a DC and use GetTextFace() to check which font was actually selected. The result is Arial. I was surprised that the font wasn't Arial Bold, which is a separate face with a different font file. The only way to specify the Arial Bold font was to set pszFaceName to "Arial Bold". Unfortunately simply appending Bold to the end of a font name only works for some fonts as some fonts don't have a separate bold font.
Is there any general way to specify bold that will ensure the actual bold version of a font is returned?
Thanks
Phil