6 static void make_tests(
12 //static const char *font = "Times-Roman";
13 static const char *font = "Times Bold Italic";
15 //static const char *font = "Courier";
16 //static const char *font = "Courier Bold Oblique";
22 #define charset_legend "Macintosh charset"
29 #define charset_legend "IsoLatin1 charset"
36 print(AE); /* very wide char */
37 print(AE AE AE AE AE AE AE AE AE AE AE AE AE AE AE);
38 print(charset_legend);
41 print("Hello, world");
42 print("AVAVAVAVAVAVAVAVAVAVAVAVAVAVAVAVAVAV");
43 print("AAAAAAAAAAAAAAAAAAVVVVVVVVVVVVVVVVVV");
44 print("fiffififfififfififfififfififfififfi");
47 print("fifififififififififififififififififififififififififi");
48 print(AE "bleskiver med gl" oe "gg. " NBSP NBSP NBSP NBSP NBSP NBSP NBSP
49 AE " Fywerhus: 'A " ae " u " aa " " ae " " oe " i " ae " fywer'.");
50 print("Ingef" ae "rp" ae "rer med karamelsauce. R" oe "dgr" oe "d med fl"
53 ("(Optional.) Ligature sequence where successor and ligature are both names. The current character may join ...");
61 fprintf(fp, "<line x1=\"%.2f\" y1=\"%.2f\" x2=\"%.2f\" y2=\"%.2f\""
62 " stroke-width=\"1\" stroke=\"#000\"/>\n", x, y1, x, y2);
70 double width = afm_get_text_width(0, font, size, 4, s);
71 unsigned char *up = (unsigned char *) s;
73 fprintf(stderr, "Width = %f for '%s'\n", width, s);
76 fprintf(fp, "<text x=\"%.2f\" y=\"%.2f\" font-size=\"%.2f\">", x, y,
79 unsigned char ch = afm_host2unicode(*up);
84 fprintf(fp, "&#%d;", ch);
87 fputs("</text>\n", fp);
88 vline(x + width, y, y + 5);
96 "<?xml version=\"1.0\" standalone=\"no\"?>\n"
97 "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\"\n"
98 " \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n"
99 "<svg width=\"650\" height=\"400\" preserveAspectRatio=\"xMidYMid\"\n"
100 " font-family=\"%s\">\n", font);
107 fputs("</svg>\n", fp);
113 fp = fopen("test.svg", "w");
115 fprintf(stderr, "Can't create output.\n");