From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLYTO,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,410af5103e59350f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-12 13:01:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-05!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Russell L Johnson" Newsgroups: comp.lang.ada Subject: Re: Ada facility for determining dimensions (height/width) for display/print character string? Date: Tue, 12 Nov 2002 15:54:43 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: Reply-To: "Russell L Johnson" References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:30782 Date: 2002-11-12T15:54:43-05:00 List-Id: The text will be in Windows and it looks what I need is either Graph.TextHeight (and Graph.TextWidth) or the Windows GetTextExtent function [unless I decide to use TeX or PostScript :^) ]. Thanks to all for your helpful information. Sorry I accidentally posted my original post twice. - Russ "Georg Bauhaus" wrote in message news:aq89j9$dht$1@a1-hrz.uni-duisburg.de... > RussJohnson@frontiernet.net wrote: > : Does Ada have a facility for determining the dimensions (height and width) > : that it will take to display/print a given string of characters? > > The only programming language I know of that has a facility like this > (using the language proper, i.e. not asking the operating systems using > some function of the operating system's API or some such) > is PostScript, which has builtin operators for text strings and > bounding box heights of characters and fonts. > > Again, where does your text live? Is it a string "in Windows"? > Use a call to the appropriate operating system's library function to find > its dimensions. This is the same in any language. > Are you dealing with a typwriter like printer? > In that case the number of characters should give enough hints. > Do you have to ask a Java Virtual Machine for the dimensions > of specific characters in specific fonts? Etc. > > -- georg