
------------------------
TYPOG: New Type From Old
By Brice Richmond
------------------------

     In this drawer are three graphic fonts: Candy, Irongate and Sky. All
three were generated by programs, rather than designed.
     In presenting the method, I hope it gives you ideas for generating your
own unique graphic fonts.
     You can double-click on the icons of these three, to see them.
     Also in the drawer are the following activities:
    -- CANDYTYPE, a program which generates a "candy cane" font in keeping
with this festive month. It automatically saves the screen to RAM:.
     -- OUTLINE, a compiled program which creates an outline font that was
the basis for SKY. It is also saved to RAM. It takes quite a while to run.
     -- OUTLINE.HSB is the Basic source of the OUTLINE program.
     To see CANDYTYPE and OUTLINE run is to understand how the work far
better than I can describe it -- though I have included the CANDYTYPE listing
with comments at the end of this article. On a 25-MHz -030 machine, the
program completes itself in a few minutes. However, I must warn you that on
a 7.16-MHz Amiga the process will require more than 20 minutes.
     The graphic files CANDY, SKY and IRONGATE have been PowerPacked and
would have to be decrunch before they can be accessed by paint programs.
Here is the Shell command that will do it:

j:util/decrunch j:typog/candy ram:candy 2    <press Return>

This decrunches the Candy file into a RAM: file by the same name.
     Also see the Fontread drawer for FONTREAD, a program you can use to
print and save screens comprised of title and message material you can type
in a text file for loading, rather than working with a paint program.
     I created all the material except for the IRONGATE screen, which was
done by JUMPDISK staff using an OUTLINE program variation which softens
jaggies and gives peaks to letters. The program is not included, but the font
is, and I find it stylistically interesting.
     Though primitive in the overall, the first issue of JUMPDISK, dated
August 1986, contained the seed of this idea whereby large, ornate typography
was created from small, plain type.
     The idea was contained in a simple Basic program:
     1. Print an 8 point character in the upper left corner of the screen.
     2. Test the 64 possible pixel positions for on-off status -- eight
across by eight down.
     3. If a pixel point is "on," that is forming part of the character, then
draw a larger representation of the pixel -- a circle, a square, whatever --
down and to the right a specified mutiple of the original position. In other
words, a larger version of the character is replicated in another screen
position.
     It occurred to me in 1986 that a precise and more fully realized version
of this method could be written to create new, larger fonts.
     As the years rolled by, I noticed frequent contributor J.E. Charlsen
either picked up on that early method or made a parallel discovery on his
own, for many of his programs employ large type formed from smaller
characters.
     Finally, I wrote a program that creates and saves a screen comprised of
the ASCII characters from 33 to 126, using a simple 8-point font as the
basis. The program calls the system's current font, so if you're using the
2.0 operating system, you might want to ensure you have the font set to
an 8-point font. When the graphic representation of those characters is
complete, it fills a the screen like this:

!"#$%&'()*+,-./0123
456789:;<=>?@ABCDEF
GHIJKLMNOPQRSTUVWXY
Z[\]^_`abcdefghijkl
mnopqrstuvwxyz{|}~

     I cannot claim this collection of characters is a font. They omit
numerous control characters. However, they include all the regular keyboard
characters one would normally use in writing.
     I must credit Charles Vassallo's graphic screen load/save routines for
making this method ultimately possible. Until the ILBM.bcode2 code appeared
in JUMPDISK, there was no easy way of saving created screens.
     Following is a lightly commented listing of the CANDYTYPE program.
Programmers will understand the method. Non-programmers won't care, for they
have the screens of graphic results which can be loaded into paint programs
and formed into titles, reworked, recolored, etc.
     I hope other programmers take this idea farther than I have. One could
create huge characters, saving screens in sequence as they fill.
Multicolored type could be created, as well characters formed of unusual
shapes: triangles, GETed patterns, random short lines, and anything else your
imagination brings.
     Following is source code for the Candy Type program.

' CANDY FONT
' © 1991 by Brice Richmond, A JUMPDISK exclusive.
' NO REDISTRIBUTION ALLOWED

CLS:CLEAR
DIM ilbm%(1300),stripe(256)
BLOAD ":ilbm.bcode2",VARPTR(ILBM%(0))
SCREEN 1,640,208,3,2
WINDOW 1,"",,432,1
PALETTE 0,0,0,1 ' black
PALETTE 1,0,0,0 ' black
PALETTE 2,0,0,1 ' red
PALETTE 3,1,1,1 ' white

' CREATE STRIPES FOR PUTTING OVER FINISHED CHARACTERS
FOR y=0 TO 100 STEP 6
LINE(0,y)-(160,y+2),1,bf
NEXT y
z=1
FOR x=160 TO 0 STEP -1
z=z+.5
SCROLL(x,0)-(x,160),0,z
NEXT x
GET(59,50)-(94,85),stripe
CLS
PALETTE 2,1,0,0 ' red
PALETTE 0,0,0,1 ' blue

COLOR 1,0
x=4:y=20

' PRINT ASCII CHARACTERS 33 to 126 AT POSITION ONE ON SCREEN
FOR ch=33 TO 126
LOCATE 1,1
LINE(0,0)-(8,8),0,bf
? CHR$(ch);

' READ PIXEL POSITIONS OF THE CHARACTER JUST PRINTED
FOR b=0 TO 8
FOR a=0 TO 8
x1=x+(a*4): y1=y+(b*4)

' IF A PIXEL IS ON, THEN GOSUB TO SUBROUTINE CALLED MAKIT
IF POINT(a,b)=1 THEN GOSUB makit:
NEXT a,b

' THIS SPACES TO NEXT LARGE TYPE POSITION
x=x+33: ct=ct+1
IF CHR$(ch)<>"Y" THEN r=0 ELSE r=3

' PUTS THE CANDY STRIPE OVER THE DRAWN CHARACTER
PUT(x1+r-35,y1-35),stripe,XOR
IF ct=19 THEN ct=0: x=4:y=y+36
NEXT ch

FOR y=0 TO 208
FOR x=0 TO 640
IF POINT(x,y)=1 THEN PSET(x,y),0
NEXT x,y

' THIS IS CHARLES VASSALLO'S ROUTINE FOR SAVING A SCREEN AS A GRAPHIC
SUB saveILBM(file$)
SHARED ILBM%()
LOCAL file0$,saving&
file0$=file$+CHR$(0)
saving&=VARPTR(ilbm%(0))+&H62C
CALL LOC saving&,SADD(file0$),WINDOW(7)
END SUB

saveILBM "RAM:Candy.pic"
LOCATE 25,1
COLOR 3
?"Press any key to continue.";
WHILE z$=""
z$=INKEY$
WEND
CLS
?"On exiting program, open a Shell or CLI and type:"
?
?"j:util/ppshow ram:candy.pic  <and press RETURN key>"
?
?"This picture can be loaded by paint programs. Now, tap a key to exit.";
FOR t=1 TO 2000:NEXT t
WHILE l$=""
l$=INKEY$
WEND
WINDOW CLOSE 1
SCREEN CLOSE 1
SYSTEM

' THE FOLLOWING ROUTINE DRAWS A CIRCLE AT A NEW SCREEN POINT CORRESPONDING
' TO THE PIXEL FOUND `ON' IN THE SMALL CHARACTER

makit:
IF CHR$(ch)="Y" THEN x1=x1+3
FOR p=0 TO 3
CIRCLE(x1,y1),p,3,,,1

NEXT p: RETURN
