🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12811

Re: font file from font name

#12811
From: Remy Lebeau (TeamB)
Date: Tue, 18 Nov 2003 17:49
26 lines
1926 bytes
"Cherubino Ferrario" <cherferr@tin.it> wrote in message
news:3fba54f8@newsgroups.borland.com...

> I have a problem: I need to know the files associated to
> a certain font and understand them from the font name.

Sorry, the Win32 API has no such provisions for doing that.  Short of
learning how the font's physical file structure works (refer to the font
specs available at http://www.microsoft.com/typography), and then
programmably enumerating and reading the files in the Fonts directory and
extracting their information manually, what you ask for is not easily doable
(but not impossible).

There is a Registry key that lists font names and file names:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Fonts

However it has been reported that this list does not always contain the
expected font names that are displayed in font dialogs and such, so some
mappings may be harder to resolve then others.

This is a pretty uncommon request.  Why exactly do you need this?


Gambit
Technical Details
Message-ID: <3fba5adc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fba54f8@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,849ac358deb88004
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-18 10:09:58 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fba54f8@newsgroups.borland.com>
Subject: Re: font file from font name
Date: Tue, 18 Nov 2003 09:49:11 -0800
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.149
Message-ID: <3fba5adc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069177564 67.22.137.149 (18 Nov 2003 09:46:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail