home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
printer
/
dvi2pcl.lha
/
permfonts.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-25
|
1KB
|
51 lines
/*
* Determines how many fonts are permanently downloaded and which of them
* correspond to the fonts, used in the .dvi file. Those are marked in their
* font->down by the identifier fdown. All font information for a permanent
* downloaded font is taken from its .tfm file by calling `loadtfmfile'.
*/
#include <stdio.h>
#include "globals.h"
int permfonts(resfile)
FILE *resfile;
{
char buffer[TERMLINELENGTH];
char orient[2];
char resname[NAMELENGTH];
char *fontname;
int act_fonts_down = 0;
int f;
int fdown;
int fsize;
while(fscanf(resfile,"%s %d %d %s", buffer, &fsize, &fdown, orient) != EOF)
if(buffer[0] == 'M')
printer.mem = fsize;
else
{
while(getc(resfile) >= ' ');
if((orient[0] == 'L' && landscape)
|| (orient[0] == 'P' && !landscape)) {
for (f=0; f<MAXFONTS; f++)
if(font = fontptr[f]) {
if(font->dir_size == fsize) {
fontname = names + font->name;
if(!*fontname) {
fontname++;
if(!strcmp(fontname,buffer)) {
font->down = fdown;
loadtfmfile();
}
}
}
}
act_fonts_down++;
}
}
(void)fclose(resfile);
return(act_fonts_down);
}