Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

EnumFontFamiliesEx() not working correctly

$
0
0
I just need the exact set of fonts and font styles that show up in Notepad. I am pretty sure that this is also the exact same set that shows up in CFontDialog. 

Apparently it is not quite possible to get this set of Fontname + FontStyle from EnumFontFamiliesEx(). If this function is run once without LOGFONT:lfFaceName specified we get the set of names generally without styles. 

If we run this function again with LOGFONT:lfFaceName filled in for each name we generally get back the names that are associated with the styles. This only works consistently if the first set of returned names does not contain style information. 

In the case of Calibri we only get back two names:
Calibri 
Calibri Light Italic

If we would have gotten back "Calibri Light" instead of "Calibri Light Italic" it would have worked.

100% Accurate Display Screen OCR http://www.OCR4Screen.com


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>