Hi all,

Whilst waiting for the Prowess Euro fonts, I have devised a small 
basic proc that draw a euro. I use it as follows:

PFshow gstate, whatever
draweuro
PFshow gstate, whatever

Maybe someone finds this useful.

Wolfgang

DEFine PROCedure draw_euro
rem print approx. Euro sign
rem this presumes that 2 global variables exist:
rem   - gstate
rem   - charsize : CURRENT character size
LOCal box(3),xs,ys,wid
  wid =charsize DIV 12
  IF NOT wid : wid=1                    : rem make line width
  PFShow Gstate, 'C'                    : rem show a 'C'
  get_box Gstate,box                    : rem get max Font sizes
  ys=box(1)/5                           : rem magic!
  PFWidth Gstate,'C',xs                 : rem get xsize of C char
  xs=xs-1
  PFPathMethod Gstate,1
  PFLineWidth Gstate,wid
  IF charsize<10:wid=.5
  PFMoveR Gstate,-xs-1,-ys-.5           : rem now draw the two lines
  PFLineR Gstate,xs,0
  PFMoveR Gstate,-xs,-wid*2
  PFLineR Gstate,xs,0
  PFMoveR Gstate,1,ys+.5+wid*2
  PFPathDraw Gstate                     : rem and show them
END DEFine draw_euro
:
DEFine PROCedure get_box (Gstate,box_size)
rem gets the size of a fontbox into the box_size array
rem passed as param
LOCal xo,yo,xs,ys
  PFFontBbox Gstate, xs,ys,xo,yo
  box_size(0)=xs
  box_size(1)=ys
  box_size(2)=xo
  box_size(3)=yo
END DEFine get_box
:

-----------------
www.wlenerz.com

Reply via email to