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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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-05 03:21:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!peernews3.colt.net!news0.de.colt.net!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Ada facility for determining dimensions (height/width) for display/print character string? Date: Tue, 5 Nov 2002 11:21:13 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1036495273 13885 134.91.1.34 (5 Nov 2002 11:21:13 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 5 Nov 2002 11:21:13 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:30378 Date: 2002-11-05T11:21:13+00:00 List-Id: 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