{
Widget form, BodyWidget, w;
char *fontset_name = NULL;
+ char *font_name = NULL;
int fontsize = 0;
char *initial_input_method = NULL;
int col = 80, row = 32;
int with_xim = 0;
int i, j;
char *filter = NULL;
+ MFont *font = NULL;
setlocale (LC_ALL, "");
/* Create the top shell. */
i++;
fontset_name = strdup (argv[i]);
}
+ else if (! strcmp (argv[i], "--font"))
+ {
+ i++;
+ font_name = strdup (argv[i]);
+ }
else if (! strcmp (argv[i], "--im"))
{
i++;
default_font_size = (int) mfont_get_prop (font, Msize);
}
+ if (font_name)
+ {
+ font = mfont_parse_name (font_name, Mnil);
+ if (font)
+ {
+ int score;
+ MFont *obj;
+
+ if (fontsize > 0 && ! mfont_get_prop (font, Msize))
+ mfont_put_prop (font, Msize, (void *) fontsize);
+ obj = mfont_find (frame, font, &score, 0);
+ if (obj)
+ mtext_put_prop (mt, 0, mtext_len (mt), Mfont, obj);
+ }
+ }
+
font_width = (int) mframe_get_prop (frame, Mfont_width);
font_ascent = (int) mframe_get_prop (frame, Mfont_ascent);
font_descent = (int) mframe_get_prop (frame, Mfont_descent);
m17n_object_unref (face_default);
m17n_object_unref (default_face_list);
m17n_object_unref (selection);
+ if (font)
+ free (font);
XFreeGC (display, mono_gc);
XFreeGC (display, mono_gc_inv);
M17N_FINI ();
+ free (font_name);
free (fontset_name);
free (filename);
free (input_method_table);