lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Euro symbol in Lout


From: Andrew Bardsley
Subject: Re: Euro symbol in Lout
Date: Fri, 3 Sep 1999 12:24:35 +0100 (BST)

On Fri, 3 Sep 1999, Jeff Kingston wrote:

> Alternatively, if we can construct a Euro symbol out of existing
> bits and pieces (it's a lower case e with a couple of strokes or
> something, isn't it?) we could define a @Euro symbol.  If anyone
> knows what a Euro looks like and can supply such a definition I
> would be happy to add it for the next release.

The EU's web site gives a construction diagram for the Euro
symbol. I belive (though I can't find the appropriate reference)
that the symbol should be drawn that way in all fonts. I don't
think it is though.

Find enclosed the files `euro', `euro.lpg' and `eurotest'
with a postscript rendering of the symbol written by me
from the diagram.  I don't know enough about Lout internals
to get the spacing for the symbol right but /euro has a
size of (approx.) 1.15 by (exactly) 1.

euro:

---8<---
@PrependGraphic { euro.lpg }

import @BasicSetup
        def @Euro { @BackEnd @Case {
        PostScript @Yield { { ysize dup scale euro } @Graphic { "  " } }
        PDF @Yield { E } # Dunno any PDF
        PlainText @Yield { E }
}}
---8<---

euro.lpg:

---8<---
%%BeginResource: procset EuroPrependGraphic
/euro {
        /tan { dup sin exch cos div } def
        /diag { 22.5 tan exch 6 add mul } def
        /box {
                /base exch def /loft base 1 add def
                base diag base moveto
                loft diag loft lineto
                1.5 diag 10.5 sub loft lineto
                0.5 diag 10.5 sub base lineto
                closepath fill
        } def
        gsave
        1 12 div dup scale
        10.5 0.5 diag sub 6 translate
        newpath
        0 0 5 40 320 arc
        0 -1 rlineto
        0 0 6 5 6 div 40 cos mul arccos neg 45 arcn
        closepath
        fill
        0.5 box
        -1.5 box
        grestore
} def
%%EndResource
---8<---

eurotest:

---8<---
@SysInclude {doc}
@Include {euro}
@Document
        @InitialFont { Helvetica Base 36p }
//
@Text @Begin
@LP
@Euro 100 &0.5su 000 next
@LP
n @Box margin {0c} Hello @Box margin {0c} @Euro @Euro @Euro @Euro @Euro @Euro
@LP
n @address@hidden@address@hidden@address@hidden
@End @Text
---8<---

- Andrew
    _______________
___/Andrew Bardsley\____________________________________________
University_of_Manchester Dept. of Computer Science  AMULET Group
PhD__/student Mail:\bardsleyATcs.man.ac.uk_Tel:_+44_161_275_6844
Snail: Room IT302, Man. Uni., Oxford Rd, Manchester, M13 9PL, UK


reply via email to

[Prev in Thread] Current Thread [Next in Thread]