🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Character width in pixels

#2058
From: danzer
Date: Thu, 26 Apr 2007 15:30
27 lines
1492 bytes
Renald Yazmir wrote:
> Hello,
> 
> 
> 
> Is it possible to set font that all characters have the same width in 
> pixels?
> 
> Currently with my settings all digits are 5 pixels, space and period are 4 
> pixels.
> 
> 
> 
> I am using GetTextExtentPoint32(..) to determine character width in pixels.
> 
> 
> 
> What parameter in LOGFONT needs to be set?
> 
> Any examples?
> 

You might want to examine the ExtTextOut function and in particular the 
lpDx argument.  Using the lpDx argument you can control the position of 
the characters regardless of the font used.

Danzer
Technical Details
Message-ID: <4630c5a3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <462f6798$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7b004aa1f1c5a3e9
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 26 Apr 2007 10:30:29 -0500
From: danzer <.>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070222 SeaMonkey/1.1.1
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Character width in pixels
References: <462f6798$1@newsgroups.borland.com>
In-Reply-To: <462f6798$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.96.229.17
Message-ID: <4630c5a3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1177601443 24.96.229.17 (26 Apr 2007 08:30:43 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail