/* * 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 #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; fdir_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); }