Does anyone know of a good way to find out all possible font styles for
a TrueType font? Found that enumerating the fonts isn't enough - some
can be bold and italic, but can't be both at same time, etc.
Found a working solution by creating a font of each desired style, select
into a DC, look at textmetric members and then de-select/delete. If they
match what I wanted to create, add to list, else font can't be this style.
Means I have to do this at least four times for each font name, FW_NORMAL
and FW_BOLD, both with tmItalic on/off. For more exact table, would have
to run through all tmWeigth possibilites, from FW_DONTCARE to FW_BLACK, but..
Is fast enough though - instant, but code looks terrible. Maybe I have missed
some clever little API that returns all valid styles for a font name in one take..?
------------------
a TrueType font? Found that enumerating the fonts isn't enough - some
can be bold and italic, but can't be both at same time, etc.
Found a working solution by creating a font of each desired style, select
into a DC, look at textmetric members and then de-select/delete. If they
match what I wanted to create, add to list, else font can't be this style.
Means I have to do this at least four times for each font name, FW_NORMAL
and FW_BOLD, both with tmItalic on/off. For more exact table, would have
to run through all tmWeigth possibilites, from FW_DONTCARE to FW_BLACK, but..
Is fast enough though - instant, but code looks terrible. Maybe I have missed
some clever little API that returns all valid styles for a font name in one take..?

------------------
Comment