Get a font filename based on Font Name and Style (Bold/Italic)
- by Brad
This has been driving me crazy all day.
I need to get a font filename (eg. Arial.ttf) based off of it's name (Arial in this case). The problem is, I am only supplied with the font name (Arial) and weather it's bold, italic or both. Using those pieces of information, I need to find the font file so I can use it for rendering.
Some more examples:
Calibri, Bold would resolve to calibrib.ttf
Calibri, Italic would resolve to calibrii.ttf
Any ideas on how I could achieve this in C++ (Win32)