continue;
idx = sfnt_glyphtoindex(fe->font->info->fontfile,
fe->vector[i]);
- if (start >= 0 && idx - startidx == i - start) {
+ if (start >= 0 && idx - startidx == (unsigned)(i - start)) {
if (ranges[start] == 1) {
nranges++; nchars--;
}
objtext(cidfont, "/FontDescriptor ");
objref(cidfont, fontdesc);
objtext(cidfont, "\n/W[0[");
- for (i = 0; i < sfnt_nglyphs(fe->font->info->fontfile); i++) {
+ for (i = 0; i < (int)sfnt_nglyphs(fe->font->info->fontfile); i++) {
char buf[20];
double width;
width = find_width(fe->font,
* Write out the PDF file.
*/
- fp = fopen(filename, "wb");
+ if (!strcmp(filename, "-"))
+ fp = stdout;
+ else
+ fp = fopen(filename, "wb");
if (!fp) {
error(err_cantopenw, filename);
return;
olist.tail->number + 1, cat->number, info->number);
fprintf(fp, "startxref\n%d\n%%%%EOF\n", fileoff);
- fclose(fp);
+ if (fp != stdout)
+ fclose(fp);
sfree(filename);
}