The R Project SVN R

Rev

Rev 5507 | Rev 6098 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5507 Rev 5731
Line 351... Line 351...
351
	    if (mode != StartFontMetrics) goto error;
351
	    if (mode != StartFontMetrics) goto error;
352
	    if (!GetCharInfo(buf, metrics)) goto error;
352
	    if (!GetCharInfo(buf, metrics)) goto error;
353
	    break;
353
	    break;
354
 
354
 
355
	case Unknown:
355
	case Unknown:
356
	    printf("Warning: unknown AFM entity encountered\n");
356
	    printf("Warning: unknown AFM entity encountered");
357
	    break;
357
	    break;
358
 
358
 
359
	case Empty:
359
	case Empty:
360
	default:
360
	default:
361
	    break;
361
	    break;
Line 696... Line 696...
696
 
696
 
697
    /* Check and extract the device parameters */
697
    /* Check and extract the device parameters */
698
 
698
 
699
    if(strlen(file) > 127) {
699
    if(strlen(file) > 127) {
700
	free(dd);
700
	free(dd);
701
	error("filename to long in postscript\n");
701
	error("filename to long in postscript");
702
    }
702
    }
703
 
703
 
704
    /* allocate new postscript device description */
704
    /* allocate new postscript device description */
705
    if (!(pd = (PostScriptDesc *) malloc(sizeof(PostScriptDesc))))
705
    if (!(pd = (PostScriptDesc *) malloc(sizeof(PostScriptDesc))))
706
	return 0;
706
	return 0;
Line 721... Line 721...
721
    pd->landscape = horizontal;
721
    pd->landscape = horizontal;
722
    pointsize = floor(ps);
722
    pointsize = floor(ps);
723
    if(pd->bg == NA_INTEGER && pd->col == NA_INTEGER) {
723
    if(pd->bg == NA_INTEGER && pd->col == NA_INTEGER) {
724
	free(dd);
724
	free(dd);
725
	free(pd);
725
	free(pd);
726
	error("invalid foreground/background color (postscript)\n");
726
	error("invalid foreground/background color (postscript)");
727
    }
727
    }
728
 
728
 
729
    /* Deal with paper and plot size and orientation */
729
    /* Deal with paper and plot size and orientation */
730
 
730
 
731
    if(!strcmp(pd->papername, "Default") ||
731
    if(!strcmp(pd->papername, "Default") ||
Line 755... Line 755...
755
	pd->pageheight = 10.5;
755
	pd->pageheight = 10.5;
756
    }
756
    }
757
    else {
757
    else {
758
	free(dd);
758
	free(dd);
759
	free(pd);
759
	free(pd);
760
	error("invalid page type (postscript)\n");
760
	error("invalid page type (postscript)");
761
    }
761
    }
762
    pd->paperwidth = 72 * pd->pagewidth;
762
    pd->paperwidth = 72 * pd->pagewidth;
763
    pd->paperheight = 72 * pd->pageheight;
763
    pd->paperheight = 72 * pd->pageheight;
764
    if(pd->landscape) {
764
    if(pd->landscape) {
765
	double tmp;
765
	double tmp;
Line 855... Line 855...
855
static int MatchFamily(char *name)
855
static int MatchFamily(char *name)
856
{
856
{
857
    int i;
857
    int i;
858
    for(i = 0; Family[i].family != NULL; i++)
858
    for(i = 0; Family[i].family != NULL; i++)
859
	if(!strcmp(name, Family[i].family)) return i;
859
	if(!strcmp(name, Family[i].family)) return i;
860
    warning("unknown postscript font family, using %s\n",
860
    warning("unknown postscript font family, using %s",
861
	    Family[3].family);
861
	    Family[3].family);
862
    return 3;
862
    return 3;
863
}
863
}
864
 
864
 
865
static void SetColor(int color, DevDesc *dd)
865
static void SetColor(int color, DevDesc *dd)