Article View: comp.lang.postscript
Article #490Re: Underline font
From: Frank Jensen
Date: Mon, 13 Apr 1992 10:27
Date: Mon, 13 Apr 1992 10:27
68 lines
3303 bytes
3303 bytes
In article <3245@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes: In article <1992Apr7.024443.20428@serval.net.wsu.edu> hakimian@yoda.eecs.wsu.edu (Karl Hakimian - staff) writes: <This may be a stupid question, but how do you under line a word in a particular <font? < <What I hope the answer is not is to draw a line under it. Fonts seem to come <with underline information built in (ie. underline postion and underline width). <How do you use this information. You draw a line under it. Sorry, but PostScript fonts do not have underline stuff in them, only the info about the character itself. Not quite correct. Here is the top portion of Utopia-Regular: %!PS-AdobeFont-1.0: Utopia-Regular 001.001 %%CreationDate: Wed Oct 2 19:10:38 1991 %%VMusage: 32987 39879 %% Utopia is a registered trademark of Adobe Systems Incorporated. 11 dict begin /FontInfo 10 dict dup begin /version (001.001) readonly def /Notice (Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated.) readonly def /FullName (Utopia Regular) readonly def /FamilyName (Utopia) readonly def /Weight (Regular) readonly def /ItalicAngle 0 def /isFixedPitch false def /UnderlinePosition -100 def /UnderlineThickness 50 def end readonly def The FontInfo dictionary for the font may contain UnderlinePosition and UnderlineThickness. The Adobe Font Metric Files Specification Version 3.0 has the following to say about this info: UnderlinePosition number (Optional.) Distance from the baseline for centering underlining strokes. This may be interpreted as a y-displacement for writing direction 0, and an x-displacement for writing direction 1. UnderlineThickness number (Optional.) This is the stroke width for underlining, expressed in character coordinate space (proportional to the characters in the font program.) <If this is an easy question and I overlooked the obvious, please give me the <answer along with the flames. :-) < <BTW I looked in the three Adobe books to find an example of underlined text. I <did not see any. Since you know the starting point of the text, you determine the length of the string, drop down a point or two and draw a line of string length. That is a simple way of doing it. -- harvard\ att!nicmad\ spool.cs.wisc.edu!astroatc!vidiot!brown Vidiot ucbvax!uwvax..........!astroatc!vidiot!brown rutgers/ INTERNET:vidiot!brown%astroatc.UUCP@spool.cs.wisc.edu brown@wi.extrel.com --- Frank Jensen, fj@iesd.auc.dk Department of Mathematics and Computer Science Aalborg University DENMARK
Technical Details
Message-ID:
<FJ.92Apr13112734@loke.iesd.auc.dk>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!dkuug!iesd!iesd.auc.dk!fjReferences:
<1992Apr7.024443.20428@serval.net.wsu.edu> <3245@vidiot.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!dkuug!iesd!iesd.auc.dk!fj From: fj@iesd.auc.dk (Frank Jensen) Newsgroups: comp.lang.postscript Subject: Re: Underline font Message-ID: <FJ.92Apr13112734@loke.iesd.auc.dk> Date: 13 Apr 92 10:27:34 GMT References: <1992Apr7.024443.20428@serval.net.wsu.edu> <3245@vidiot.UUCP> Sender: news@iesd.auc.dk (UseNet News) Organization: Mathematics and Computer Science, Aalborg University Lines: 68 In-Reply-To: brown@vidiot.UUCP's message of 9 Apr 92 16:59:02 GMT