EnumFontFamiliesEx() is not working correctly, see my reply to OReubens:
I need to know the best way to enumerate every Combination of FontName + FontStyle that is defined for a specific font. I need the same sort of list that CFontDialog provides.
I need to be able to create each of these fonts for a specific LOGFONT::lfHeight value.
Most fonts only have FW_REGULAR(400) and FW_BOLD(700) defined and also have both Italic and Regular (non-Italic) variations.
Some Fonts have extra Weights from FW_THIN(100) to FW_BLACK(900). Some fonts have extra styles: (Arial Narrow). Some fonts lack Weights or Styles that most font have: (Brushwood Italic), (Alois Heavy).
I need the simplest way to obtain all of the combinations that are defined for each specific font.
The problem arises when EnumFontFamiliesEx() does not return the same set of LOGFONT::lfFaceNames that correspond to the font names contained within the individual font files.
EnumFontFamiliesEx() only returns these two FontNames
1) Calibri
2) Calibri Light Italic
Yet there are actually six font files:
1) Calibri Bold
2) Calibri Bold Italic
3) Calibri Italic
4) Calibri Light
5) Calibri Light Italic
6) Calibri Regular
It looks like I may need a way to obtain the FontNames that are contained within the individual font files. Then I may be able to create each instance of every font by directly using these names.
Does anyone have any ideas?
I need to know the best way to enumerate every Combination of FontName + FontStyle that is defined for a specific font. I need the same sort of list that CFontDialog provides.
I need to be able to create each of these fonts for a specific LOGFONT::lfHeight value.
Most fonts only have FW_REGULAR(400) and FW_BOLD(700) defined and also have both Italic and Regular (non-Italic) variations.
Some Fonts have extra Weights from FW_THIN(100) to FW_BLACK(900). Some fonts have extra styles: (Arial Narrow). Some fonts lack Weights or Styles that most font have: (Brushwood Italic), (Alois Heavy).
I need the simplest way to obtain all of the combinations that are defined for each specific font.
The problem arises when EnumFontFamiliesEx() does not return the same set of LOGFONT::lfFaceNames that correspond to the font names contained within the individual font files.
EnumFontFamiliesEx() only returns these two FontNames
1) Calibri
2) Calibri Light Italic
Yet there are actually six font files:
1) Calibri Bold
2) Calibri Bold Italic
3) Calibri Italic
4) Calibri Light
5) Calibri Light Italic
6) Calibri Regular
It looks like I may need a way to obtain the FontNames that are contained within the individual font files. Then I may be able to create each instance of every font by directly using these names.
Does anyone have any ideas?