✅ Win32 EnumFontFamiliesEx doesn't call the callback I provide

I wrote a class to test if a WPF font is fixed width. But the only way I could find to do that was to get the LOGFONT and test it. So I went through a lot of P/Invoke hoops to get there. I created a DC for the display and asked it to enumerate the fonts. My callback is never called. Can someone tell me why? EnumFontFamiliesEx is always returning 1. The only thing the MSDN documentation says about the return value is it's the last return value from the callback. But my callback was never called. My code is attached.
2 Replies
Accord
Accord15mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Will Pittenger
Will PittengerOP14mo ago
Win32 EnumFontFamiliesEx doesn't call the callback I provide - Micr...
I wrote a class to test if a WPF font is fixed width. But the only way I could find to do that was to get the LOGFONT and test it. So I went through a lot of P/Invoke hoops to get there. I created a DC for the display and asked it to enumerate the…
Want results from more Discord servers?
Add your server