Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1764

Re: Separator graphics

Newsgroups comp.lang.postscript
Date 2014-01-03 01:22 -0800
References <87a9ffxpav.fsf@Equus.Decebal.nl> <la4idk$31s$1@reader1.panix.com> <87vby2osaj.fsf@Equus.Decebal.nl>
Message-ID <d0a988fd-0599-4daf-bfce-2c0ca5bbef1e@googlegroups.com> (permalink)
Subject Re: Separator graphics
From luser- -droog <mijoryx@yahoo.com>

Show all headers | View raw


On Thursday, January 2, 2014 5:52:36 PM UTC-6, Cecil Westerhof wrote:
> Op Thursday 2 Jan 2014 21:32 CET schreef Rod Dorman:
> 
> 
> 
> > In article <87a9ffxpav.fsf@Equus.Decebal.nl>,
> 
> > Cecil Westerhof  <Cecil@decebal.nl> wrote:
> 
> >> In medieval text you often saw elaborate ‘graphics’ between
> >> paragraphs. Is there a way to do something like this with
> >> postscript?
> 
> >
> > Perhaps I'm not understanding the question but...
> >
> > Of course there is, just render whatever graphic image you want
> > whereever you want it.
> 
> I was not clear with what I mend I am afraid.
> 
> There where some standard symbols used. (Mostly with a lot of loops.)
> I was wondering if there was something for this in postscript. One
> type used where fleurons. Asterism is also used, but not very
> appealing. It can also be called ornamental symbol. Sometimes lozenge
> are used. I found some examples at:
> 
>     http://www.clker.com/clipart-3196.html
> 

As Rod and Ross have both said, the tools are there, 
but how to apply them depends a great deal on the rest of 
your workflow.

If I wanted to typeset some text with one of those designs,
maybe a simple one like

    http://www.clker.com/clipart-1943.html

I'd start by sketching it on graph paper and decomposing 
it into a series of simple curves. First select the endpoints 
of each little curve segment so that there are no loops or 
funny stuff in any one piece. Then make a guess at the 
control points. If you've seen images of Bezier curves 
together with the convex hull described by the control 
points, it shouldn't be too hard to pick the points
pretty close to where they should be. For the overall curve 
to be smooth, each end-point needs to be collinear with its 
two adjacent control points. And the two distances between 
these adjacent control points and the end-point (the Hermite 
vectors) should not be wildly dissimilar (for better 
(smoother) second-order curvature).

Then you count up the squares on the graph paper and get 
coordinates for all the points. Type them up with 
'... moveto ... curveto ... curveto ... stroke' and fire-up 
ghostscript.

Then repeat:
  1. tweak points.
  2. preview.

Once we've got a procedure that draws the curve, then the 
fun begins. Put it in a Type 3 font.

I've got an example of creating a derived font here:

    http://codegolf.stackexchange.com/a/3948/2381

It uses Times Roman for most characters, but draws a box around them.
It also overrides the '#' character to draw a filled box.

The override in this code is done inside the BuildChar procedure. 
It would be better to replace the element in the Encoding vector
to do the override.

If you add this graphic as a font glyph in this way, then you can
treat it like a normal text string and use whatever centering or
justifying code you have for text.

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Separator graphics Cecil Westerhof <Cecil@decebal.nl> - 2014-01-02 00:20 +0100
  Re: Separator graphics rodd@panix.com (Rod Dorman) - 2014-01-02 20:32 +0000
    Re: Separator graphics Cecil Westerhof <Cecil@decebal.nl> - 2014-01-03 00:52 +0100
      Re: Separator graphics Ross Presser <rpresser@gmail.com> - 2014-01-02 16:54 -0800
        Re: Separator graphics Cecil Westerhof <Cecil@decebal.nl> - 2014-01-03 18:40 +0100
      Re: Separator graphics luser- -droog <mijoryx@yahoo.com> - 2014-01-03 01:22 -0800
        Re: Separator graphics luser- -droog <mijoryx@yahoo.com> - 2014-01-03 01:59 -0800

csiph-web