- double size = 12;
- double x = 10;
- double width = afm_get_text_width(0, font, size, 4, s);
- unsigned char *up = (unsigned char*)s;
- fprintf(stderr, "Width = %f for '%s'\n", width, s);
- y += 10;
- vline(x, y, y + 5);
- fprintf(fp, "<text x=\"%.2f\" y=\"%.2f\" font-size=\"%.2f\">", x, y, size);
- while (*up) {
- unsigned char ch = afm_host2unicode(*up);
- if (ch < 127)
- putc(ch, fp);
- else
- fprintf(fp, "&#%d;", ch);
- up++;
- }
- fputs("</text>\n", fp);
- vline(x + width, y, y + 5);
- y += 1.1 * size;
+ double size = 12;
+ double x = 10;
+ double width = afm_get_text_width(0, font, size, 4, s);
+ unsigned char *up = (unsigned char *) s;
+
+ fprintf(stderr, "Width = %f for '%s'\n", width, s);
+ y += 10;
+ vline(x, y, y + 5);
+ fprintf(fp, "<text x=\"%.2f\" y=\"%.2f\" font-size=\"%.2f\">", x, y,
+ size);
+ while (*up) {
+ unsigned char ch = afm_host2unicode(*up);
+
+ if (ch < 127)
+ putc(ch, fp);
+ else
+ fprintf(fp, "&#%d;", ch);
+ up++;
+ }
+ fputs("</text>\n", fp);
+ vline(x + width, y, y + 5);
+ y += 1.1 * size;