home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
list
/
hb15-pt1.ark
/
FONT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-10-21
|
3KB
|
68 lines
{ Copyright (C) 1986 Adam Fritz, 133 Main St., Afton, N.Y. 13730 }
{$I-}
program GenerateFont ;
{$I Font.con CONstant declarations }
{$I Font.typ TYPe declarations }
{$I Font.var VARiable declarations }
i : integer ;
{$I iFont.pas Initialize font }
{$I uFont.pas Utility routines }
{$I pChar.pas Plot character with pattern }
{$I fChar.pas Fill character }
{$I rChar.pas Rasterize character }
{$I xFont.pas eXtend font }
{$I fFont.pas Finalize }
begin
{ fanfare }
writeln ('Font Generator 1.4 (C) 1986 Adam Fritz') ;
{ initialize }
InitFont ;
{ generate font }
i := nbIndex div 2 ;
while not EOF(hID) do begin
{ get character designation }
readln (hID, hChar, hNumber) ;
{ ... underbar means blank }
if hChar = '_' then
hChar := ' ' ;
iChar := Ord(hChar) ;
writeln (hChar,' ',hNumber) ;
{ if character not already defined }
if fIndex[iChar].iDef = 0 then begin
{ incrementally search Hershey index }
if hNumber > bIndex[i].iNum then
while (hNumber > bIndex[i].iNum) and (i < nbIndex) do
i := i + 1
else
while (hNumber < bIndex[i].iNum) and (i > 0) do
i := i - 1 ;
{ extend font }
if hNumber = bIndex[i].iNum then begin
{ indexed sequential access to Hershey data }
bRecord := bIndex[i].iRec ;
Seek (bdID, bRecord) ;
BlockRead (bdID, bData, 1) ;
bOffset := bIndex[i].iOff ;
{ update font index }
fIndex[iChar].iDef := 1 ;
fIndex[iChar].iOff := fOffset ;
{ extend font }
ExtendFont
end
else
writeln ('Error: Unable to Find Designation Number ',hNumber)
end
end ;
{ finalize }
FinFont
end.
{ Copyright (C) 1986 Adam Fritz, 133 Main St., Afton, N.Y. 13730 }