Get a font filename based on Font Name and Style (Bold/Italic)
Posted
by
Brad
on Stack Overflow
See other posts from Stack Overflow
or by Brad
Published on 2011-01-02T09:00:22Z
Indexed on
2011/01/02
9:53 UTC
Read the original article
Hit count: 261
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)
© Stack Overflow or respective owner