Article View: borland.public.cppbuilder.nativeapi
Article #6448Re: How to get font-name(s) inside a font-file (e.g. .ttf)?
From: Gary Setter
Date: Mon, 09 May 2005 13:10
Date: Mon, 09 May 2005 13:10
25 lines
1900 bytes
1900 bytes
<M_R> wrote in message news:0c7u719l2n1sqsjblkuj6q5kqimdvbrvun@4ax.com... > How to get font-name(s) inside a font-file (e.g. .ttf)? > > I found out, that trying to use a font of an external resource > temporarily (e.g. an own font) I can use something like this: > > if( AddFontResourceEx(font_file_name.c_str(), FR_PRIVATE, 0)!=0) > ... > > but how get I some information about this new font-resource, > especially how do I get the name(s) 'font_name' to assign to > TFont::Name, as > > Application->MainForm->Canvas->Font->Name=font_name; > Hi Michael, It depends on why you a installing user fonts I suppose. Once the font is installed, it is available via EnumFontFamilies or ChooseFont. I suppose you could use EnumFontFamilies before and after installation and check for differences. Best regards, Gary
Technical Details
Message-ID:
<427f6106$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<0c7u719l2n1sqsjblkuj6q5kqimdvbrvun@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fb5240beb7be969f,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Gary Setter" <setterg@worldnet.att.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <0c7u719l2n1sqsjblkuj6q5kqimdvbrvun@4ax.com> Subject: Re: How to get font-name(s) inside a font-file (e.g. .ttf)? Date: Mon, 9 May 2005 08:10:30 -0500 Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 12.74.20.103 Message-ID: <427f6106$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1115644166 12.74.20.103 (9 May 2005 06:09:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail