🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.nativeapi
Article #12193

Re: Windows Fonts

#12193
From: Peter Below (TeamB)
Date: Sat, 23 Nov 2002 10:18
22 lines
2119 bytes
In article <3dde62a7@newsgroups.borland.com>, Camiel Wijffels wrote:
> I'm building an app to design page layout, including text. This text should
> be scaled, so what I need is a text-drawing function with scaling ability.
> For example, I need to draw the text 'hello', 300 pixels wide. Next time I
> would like to draw the same text at 301 pixels wide, or 307, or 312 (these
> figures are purely random). It is possible - many professional packages
> (like WP, Word and CorelDraw) have this ability.

It is difficult to achieve this kind of precision if you try to do it by 
scaling the font size, especially if you are using a proportional font. IMO it 
is better to draw the text to a metafile canvas first, determine its *actual* 
width on the metafile canvas (using TextWidth), then draw the metafile scaled 
isotropically to the final display surface. 


--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
Technical Details
Message-ID: <VA.0000966e.003ca86c@antispam.compuserve.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail
References: <3dde62a7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f94dd,cd35213a00f4b682
X-Google-Attributes: gidf94dd,public
X-Google-ArrivalTime: 2002-11-23 03:15:33 PST
Date: Sat, 23 Nov 2002 11:18:58 +0100
Newsgroups: borland.public.delphi.nativeapi
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va
Organization: TeamB
Message-ID: <VA.0000966e.003ca86c@antispam.compuserve.com>
Subject: Re: Windows Fonts
From: "Peter Below (TeamB)" <100113.1101@compuXXserve.com>
Reply-To: 100113.1101@compuXXserve.com
References: <3dde62a7@newsgroups.borland.com>
NNTP-Posting-Host: 172.177.2.54
X-Trace: newsgroups.borland.com 1038046727 172.177.2.54 (23 Nov 2002 02:18:47 -0800)
Lines: 24
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail