+}
+
+int
+main (void)
+{
+ char characters[] = {
+ '!', '"', '#', '$', '%', '&','\'', '(',
+ ')', '*', '+', ',', '-', '.', '/', '0',
+ '1', '2', '3', '4', '5', '6', '7', '8',
+ '9', ':', ';', '<', '=', '>', '?', '@',
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+ 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+ 'Y', 'Z', '[','\\', ']', '^', '_', '`',
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
+ 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+ 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
+ 'y', 'z', '{', '|', '}', '~'
+ };
+
+ args_t args;
+ FT_Face ft_face;
+ double max_width, max_height;
+ cairo_surface_t *surface;
+ cairo_t *cr;
+
+ parse_args (&args);
+
+#if USE_CGIC
+ if (outputJson)
+ {
+ cgiHeaderContentType("application/json");
+ } else {
+ cgiHeaderContentType("image/png");
+ }
+#endif
+
+ ft_face = load_ft_face_for_family (args.family);
+
+ get_characters_max_width_height (ft_face, args.size,
+ characters, ARRAY_SIZE (characters),
+ &max_width, &max_height);
+
+ /* Draw */
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ (max_width + 8) * 10,
+ (max_height + 8) * 10);
+
+ cr = cairo_create (surface);
+
+ cairo_set_source_rgb (cr,
+ args.color.red,
+ args.color.green,
+ args.color.blue);
+
+ draw_character_table (cr, ft_face, args.size,
+ characters, ARRAY_SIZE (characters),
+ max_width, max_height);