WebCentric Toronto logos

A lesson in PostScript

by Chris F.A. Johnson

This logo was designed for a now-defunct MeetUp group.

All the GIFs on this page were generated from one PostScript file, webcentric1.eps, which is viewable here as text. A GIF image is created from the file using ImageMagick's convert utility. The command I used for all of them, changing only the filename for the resulting GIF, is:

convert webcentric1.eps xxx.gif

This creates a GIF file 336 x 336 pixels. Different sizes can be generated using convert's -resize command, but better results are obtained by changing the scaling in the PostScript file. (It can be edited in any text editor.) For example, to cut the dimensions in half, change the BoundingBox comment at the top of the file to:

%%BoundingBox: 0 0 168 168

...and add a scale instruction on a line after %%EndProlog:

.5 dup scale

The webcentric1.eps file in an emacs text editor window. The file is rendered in a gv window that automatically updates the display when a change is saved.

Modifying the logo

The file is mostly a prolog which defines various values and procedures. The different logos displayed on this page were made by adding instructions after the end of the prolog. The examples below are all accompanied by the code necessary to create them.

I have put together a file of colours in PostScript format: rgb.ps, (here as text). Any lines can be copied from this file into webcentric1.eps, and the names used to replace the colours in the examples below.

The file, webcentric.ps (plain text) from which I created the logos I originally submitted, was thrown together on the spur of the moment and is rather convoluted.

The Postscript file

%!PS-Adobe-2.0 EPSF-2.0
%%Title: WebCentric logos
%%Creator: Chris F.A. Johnson (emacs)
%%For: WebCentric MeetUp group
%%Routing: (mailto:cfaj@freeshell.org)
%%CreationDate: Mon Dec 08 14:39:01 2008
%%DocumentFonts: Helvetica-Bold
%%BoundingBox: 0 0 336 336
%%Copyright: 2008, Chris F.A. Johnson
%%Copying: Released under a Creative Commons
%%         Attribution-Share Alike 2.5 Canada License.
%%         http://creativecommons.org/licenses/by-sa/2.5/ca/
%%Location: http://cfaj.freeshell.org/webcentric/
%%EndComments

/bdef {bind def} bind def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Outline thickness
/ollw 4 def

%% City hall line thickness
/chlw 3 def

%% Greyscale colours
/black  {  0  g } bdef
/grey10 { .1  g } bdef
/grey20 { .2  g } bdef
/grey30 { .3  g } bdef
/grey40 { .4  g } bdef
/grey50 { .5  g } bdef
/grey60 { .6  g } bdef
/grey70 { .7  g } bdef
/grey80 { .8  g } bdef
/grey90 { .9  g } bdef
/grey95 { .95 g } bdef
/white  {  1  g } bdef

%% RGB colours
/b .25 def % uniform adjustment
/blue   { b b 1  setrgbcolor } bdef
/green  { b 1 b  setrgbcolor } bdef
/red    { 1 b b  setrgbcolor } bdef
/yellow { 1 1 b  setrgbcolor } bdef

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/ldef {load def} bdef

/n /newpath ldef
/m /moveto ldef
/l /lineto ldef
/rm /rmoveto ldef
/rl /rlineto ldef
/gs /gsave ldef
/gr /grestore ldef
/g /setgray ldef
/st /stroke ldef
/c /curveto ldef
/rls { rl st } bdef

/F { findfont exch scalefont setfont } bdef

/tw 336 def
/h tw 2 div def
/w 90 def
/margin tw w 3 mul sub 4 div def

/w1 {
    0 w rm
    0 h rl
    w 0 rl
    0 w h add neg rl
    w neg w rl
} def

/background { %% Background fill
    0 0 m
    0 tw rl
    tw 0 rl
    0 tw neg rl
    tw neg 0 rl
    fill
} def

/webcentric {
  gs
    /kern -2 def
    /fs 51 def
    fs /Helvetic-Bold F
    /namewidth (WebCentric) stringwidth pop kern add def
    h namewidth 2 div sub h w 30 add add m
    1 0 rm
    (W) show
    kern 0 rm
    (ebCentric) show
  gr
} def

/toronto {
    /kern -3 def
    /fs 22 def
    fs /Helvetic-Bold F
    /namewidth (Toronto) stringwidth pop kern add def
    h namewidth 2 div sub h w 5 sub add m
    0 0 rm
    (T) show
    kern 0 rm
    (oronto) show
} def

/slab {
    dup margin mul exch 1 sub w mul add margin m
} def

/outline {
    ollw setlinewidth
    slab w1 st
} def

/outlines {
    1 outline 2 outline 3 outline
} def

/ct {
    gs
        currentpoint translate
        -10 -2
        -20 -1
        -24 12
        c
        0 -1 rl
        st
    gr
} def

/cityhall {
    newpath
    chlw setlinewidth
    h 60 w 20 sub 60 120 arc
      st
    h 126 m
    gs
        -20 2 rm
        0 72 rl
        ct
    gr
    gs
        20 2 rm
        0 99 rl
        -1 1 scale
        ct
    gr
} def

/draw {
    /bnx 1 def
} def

/panel { bnx slab w1 fill /bnx bnx 1 add def } def

/slant {
  gs
    slab
    -45 rotate
    slantx slanty rm
    show
  gr
} def

/toronto.on.ca {
    /slantx -41 def
    /slanty  40 def
    22 /Helvetica-Bold F
    (Toronto) 1 slant
    (Ontario) 2 slant
    (Canada)  3 slant
} def

/edshaso {
    /slantx -50 def
    /slanty  42 def
    20 /Helvetica-Bold F
    (Education) 1 slant
    (Sharing) 2 slant
    (Socializing)  3 slant
} def

/torontoslant {
    /slantx -47 def
    /slanty 40 def
    20 /Helvetica-Bold F
    (TORONTO) 2 slant
} def

%% Pre-defined logos

/wcl {
    black background  white webcentric
    draw  blue panel  green panel  red panel
} def

/wclo {
    black background  white webcentric
    draw  red panel  green panel  blue panel
    white outlines
} def

/wclto {
    black background  white webcentric
    draw  blue panel  green panel  red panel
    black toronto
} def

/wclto {
    black background  white webcentric
    draw  blue panel  green panel  red panel
    black toronto
} def

/wcltos {
    black background  white webcentric
    draw  blue panel  green panel  red panel
    18 /Helvetica-Bold F
    white torontoslant
} def

%%EndProlog

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  Pre-defined logos
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% wcl    %% Plain logo
% wclo  %% Logo with outlines
% wclto
 wcltos

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  Add your custom code here
%%
%%  See http://cfaj.freeshell.org/webcentric/ for examples
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
showpage

        

Examples


%% wcl1.gif
black background
white webcentric

draw
 blue panel
 green panel
 red panel

%% wcl-tos.gif
black background
white webcentric

draw
 blue panel
 green panel
 red panel

white torontoslant

%% wcl2.gif
black background
white webcentric

draw
 red panel
 green panel
 blue panel

white outlines
      

%% wcl2.gif
black background
white webcentric

draw
 red panel
 green panel
 blue panel

black toronto

%% wcl-ch.gif
black background
white webcentric

draw
 blue panel
 green panel
 red panel
black cityhall

%% wcl-toc.gif
black background
white webcentric

draw
 blue panel
 green panel
 red panel

white toronto.on.ca

%% wcl-chtoc.gif
black background
white webcentric

draw
 blue panel
 green panel
 red panel

black cityhall
white toronto.on.ca

%% wcl-chess.gif
black background
white webcentric

draw
 blue panel
 green panel
 red panel

black cityhall
white edshaso

%% wcl-clr1.gif
% Color examples: rgb.ps
/cream  { 1 1 .8 setrgbcolor } def
/brown  { .5 0 0 setrgbcolor } def

brown background
cream webcentric

draw
 cream panel panel panel

brown cityhall
cream torontoslant

%% wcl-clr2.gif
/cream  { 1 1 .8 setrgbcolor } def

grey30 background
cream webcentric

draw
   cream panel panel panel

grey30 cityhall
cream torontoslant

%% wcl-ytoc.gif
yellow background
black webcentric toronto.on.ca

draw
 black panel panel panel

yellow cityhall
black toronto.on.ca

%% wcl-clr4.gif
/papayawhip  { 1.000 0.937 0.835 setrgbcolor } def
/maroon      { 0.690 0.188 0.376 setrgbcolor } def
/maroon1     { 1.000 0.204 0.702 setrgbcolor } def
/maroon2     { 0.933 0.188 0.655 setrgbcolor } def
/maroon3     { 0.804 0.161 0.565 setrgbcolor } def
/maroon4     { 0.545 0.110 0.384 setrgbcolor } def

papayawhip background
maroon4 webcentric

draw
 maroon2 panel
 maroon3 panel
 maroon4 panel

papayawhip toronto cityhall
maroon4 edshaso

%% wcl-anim3.gif
% Don't do this!

 black background
 white webcentric
 draw
   blue panel
   green panel
   red panel
 showpage

 black background
 white webcentric
 draw
   red panel
   blue panel
   green panel
 showpage

 black background
 white webcentric
 draw
   green panel
   red panel
   blue panel
 showpage

Here are all the "layers" of the various logos as frames in an animated GIF:

%% wcl-anim2.gif
black background
white webcentric showpage

draw
   blue panel
   green panel
   red panel
showpage

black cityhall showpage
black toronto showpage

black background white outlines showpage
black background white toronto.on.ca showpage
black background white torontoslant showpage
black background white edshaso showpage