🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6717

Re: Underlining and character lengths

#6717
From: Edward J. Ede
Date: Fri, 30 Oct 1987 19:29
30 lines
2327 bytes
In article <1987Oct27.134058.23182@gpu.utcs.toronto.edu> tomwest@gpu.utcs.toronto.edu (Tom West) writes:
>  I am adapting our word processor to a postscript engine.  However, I
>am not sure how to handle underlines.  Is there any easy way to know where
>or how to underline?  We use a mono-spaced font (for the most part).  Can
>one just draw a horizontal line of the appropriate length with the same
>vertical position as the characters?
>

No.  But you can get the from the AFM files provided by Adobe for you
driver or in Adobe's font dictionary for a postscript procedure.

In Adobe's font dictionaries, there is a dictionary called 'FontInfo'.
FontInfo contains about eight items, including 'UnderlinePosition' and
'UnderlineThickness'.  These are integer containing the number of
units from the baseline to draw a line (the number is negative) and
its width.  These numbers are in the character system coordinates
(1000 units to a point).  So divide the number by 1000 and multiply by
the current point size.  See the Red book, page 93 for more info.

>  As well, if we decide to get sophisticated, we would want to use non-mono
>fonts.  Is there anywhere that we can get the length of characters in the
>standard fonts (Times, Helvetica and Symbols)?

Again, you can use the AFM files available from Abobe or the
'stringwidth' operator.

Ted Ede -- ted@mitre-bedford.arpa -- The MITRE Corporation -- Burlington Road  
|       -- DDD: (617) 271-2545 -- Bedford MA, 10730 -- Mail Stop B015 --    |
|                   - this line intentionally left blank -                  |
+---------------------------------------------------------------------------+
Technical Details
Message-ID: <16379@linus.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!linus!mbunix!ted
References: <1987Oct27.134058.23182@gpu.utcs.toronto.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!linus!mbunix!ted
From: ted@mitre-bedford.ARPA (Edward J. Ede)
Newsgroups: comp.lang.postscript
Subject: Re: Underlining and character lengths
Message-ID: <16379@linus.UUCP>
Date: Fri, 30-Oct-87 14:29:04 EST
Article-I.D.: linus.16379
Posted: Fri Oct 30 14:29:04 1987
Date-Received: Wed, 4-Nov-87 23:07:52 EST
References: <1987Oct27.134058.23182@gpu.utcs.toronto.edu>
Sender: news@linus.UUCP
Reply-To: ted@mbunix (Ede)
Organization: The MITRE Corporation, Bedford, Mass.
Lines: 30
Keywords: Underlining.