🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12014

Re: width of font characters

#12014
From: Chuck McManis
Date: Wed, 29 Mar 1989 22:01
14 lines
1046 bytes
In article <1569@wpi.wpi.edu> pawn@wpi.wpi.edu (Kevin Goroway) writes:
>Is there any way to get the actual width of a single character of a particular
>font given that the font is loaded correctly.

	wid = TextLength(rp, "<your char>", 1);

TextLength returns the width in pixels of any arbitrary string in the
RastPort's current font. Use a one character string and a length of one.


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
"A most excellent barbarian ... Genghis Kahn!"
Technical Details
Message-ID: <96526@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!sun!pepper!cmcmanis
References: <1569@wpi.wpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!sun!pepper!cmcmanis
From: cmcmanis%pepper@Sun.COM (Chuck McManis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: width of font characters
Message-ID: <96526@sun.Eng.Sun.COM>
Date: 29 Mar 89 22:01:22 GMT
References: <1569@wpi.wpi.edu>
Sender: news@sun.Eng.Sun.COM
Reply-To: cmcmanis@sun.UUCP (Chuck McManis)
Organization: Sun Microsystems, Mountain View
Lines: 14