Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enumerating Fonts on Windows 7

23 views
Skip to first unread message

David Youngblood

unread,
Feb 3, 2010, 6:44:09 AM2/3/10
to
Anyone know how to filter out 'hidden' fonts on Windows 7 when enumerating
with EnumFontFamiliesEx? Or check the font's hidden property?

http://msdn.microsoft.com/en-us/library/dd317704(VS.85).aspx

This is all that I've found on the subject, and it implies that it's not
directly possible. So how does WordPad do it?

David


Karl E. Peterson

unread,
Feb 3, 2010, 1:07:55 PM2/3/10
to
David Youngblood explained on 2/3/2010 :

Well, I just scanned the registy for instances of "known hidden" fonts,
and found there's a REG_MULTI_SZ list of "Inactive Fonts" here:

HKCU\Software\Microsoft\Windows NT\CurrentVersion\Font Management\

And, sure enough, when I hid or showed fonts they were added to or
removed from the list.

--
.NET: It's About Trust!
http://vfred.mvps.org


David Youngblood

unread,
Feb 3, 2010, 6:25:20 PM2/3/10
to
"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:Ox31RvPp...@TK2MSFTNGP04.phx.gbl...

Thanks, I should be able to work with that. EnumFonts returns ~ 169 fonts,
both shown and hidden. And, there are ~ 267 hidden fonts in this registry
list. A list of 'active' fonts might have made life easier.

David


Karl E. Peterson

unread,
Feb 3, 2010, 6:34:46 PM2/3/10
to
David Youngblood wrote:
> "Karl E. Peterson" <ka...@exmvps.org> wrote...

That's funny! Have you run into any good explanation why they're there
in the first place? I wasn't even aware of that <ahem> feature.

David Youngblood

unread,
Feb 3, 2010, 6:58:57 PM2/3/10
to

"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:%23kFg5lS...@TK2MSFTNGP05.phx.gbl...

The hidden property first appeared in Vista, but apparently was not
implemented (hide/show have no effect). It's main purpose is to hide
international fonts that are not appropriate for the current local. Since
this doesn't work on Vista, I'm thinking of going with plan B, just use a
list of common fonts that shipped with most versions of windows.

David

David Youngblood

unread,
Feb 3, 2010, 7:05:55 PM2/3/10
to
"David Youngblood" <d...@flash.net> wrote in message
news:%23$zrczSpK...@TK2MSFTNGP06.phx.gbl...

>
> "Karl E. Peterson" <ka...@exmvps.org> wrote in message
> news:%23kFg5lS...@TK2MSFTNGP05.phx.gbl...
>> David Youngblood wrote:
>>> "Karl E. Peterson" <ka...@exmvps.org> wrote...
>>>> David Youngblood explained on 2/3/2010 :
>>>>> Anyone know how to filter out 'hidden' fonts on Windows 7 when
>>>>> enumerating with EnumFontFamiliesEx? Or check the font's hidden
>>>>> property?
>>>>>
>>>>> http://msdn.microsoft.com/en-us/library/dd317704(VS.85).aspx
>>>>>
>>>>> This is all that I've found on the subject, and it implies that it's
>>>>> not directly possible. So how does WordPad do it?
>>>>
>>>> Well, I just scanned the registy for instances of "known hidden" fonts,
>>>> and found there's a REG_MULTI_SZ list of "Inactive Fonts" here:
>>>>
>>>> HKCU\Software\Microsoft\Windows NT\CurrentVersion\Font Management\
>>>>
>>>> And, sure enough, when I hid or showed fonts they were added to or
>>>> removed from the list.
>>>
>>> Thanks, I should be able to work with that. EnumFonts returns ~ 169
>>> fonts, both shown and hidden. And, there are ~ 267 hidden fonts in this
>>> registry list. A list of 'active' fonts might have made life easier.
>>
>> That's funny! Have you run into any good explanation why they're there
>> in the first place? I wasn't even aware of that <ahem> feature.
>
> The hidden property first appeared in Vista, but apparently was not
> implemented (hide/show have no effect).

No, I was wrong, this first appeared in Windows 7.

David

Karl E. Peterson

unread,
Feb 3, 2010, 8:02:04 PM2/3/10
to
David Youngblood wrote:
> "Karl E. Peterson" <ka...@exmvps.org> wrote...
>> David Youngblood explained on 2/3/2010 :
>>> Anyone know how to filter out 'hidden' fonts on Windows 7 when enumerating
>>> with EnumFontFamiliesEx? Or check the font's hidden property?
>>>
>>> http://msdn.microsoft.com/en-us/library/dd317704(VS.85).aspx
>>>
>>> This is all that I've found on the subject, and it implies that it's not
>>> directly possible. So how does WordPad do it?
>>
>> Well, I just scanned the registy for instances of "known hidden" fonts, and
>> found there's a REG_MULTI_SZ list of "Inactive Fonts" here:
>>
>> HKCU\Software\Microsoft\Windows NT\CurrentVersion\Font Management\
>>
>> And, sure enough, when I hid or showed fonts they were added to or removed
>> from the list.
>
> Thanks, I should be able to work with that. EnumFonts returns ~ 169 fonts,
> both shown and hidden. And, there are ~ 267 hidden fonts in this registry
> list. A list of 'active' fonts might have made life easier.

That's funny! Have you run into any good explanation why they're there

in the first place? I wasn't even aware of that <ahem> feature.

--

Karl E. Peterson

unread,
Feb 3, 2010, 8:07:26 PM2/3/10
to

<burp!> Excuse me...

Karl E. Peterson

unread,
Feb 3, 2010, 8:07:01 PM2/3/10
to

So this is just yet another reason the \windows folder is 13gb now?
Jeeeez... But's it just doesn't make sense that a published mechanism
doesn't exist to filter them out. It seems they're fairly unusable,
for most purposes?

0 new messages