From d5fa72842b07002d6ef1ad555c4dc9da7837ebf2 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 18 Aug 2005 01:19:15 +0000 Subject: [PATCH] (main): Handle --fontset arg. --- example/mdump.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/example/mdump.c b/example/mdump.c index af72d91..91bf9c4 100644 --- a/example/mdump.c +++ b/example/mdump.c @@ -1,5 +1,5 @@ /* mdump.c -- Dump text image -*- coding: euc-jp; -*- - Copyright (C) 2003, 2004 + Copyright (C) 2003, 2004, 2005 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 @@ -449,6 +449,8 @@ main (int argc, char **argv) MDrawMetric rect; char *filename = "output"; int len, from; + char *fontset_name = "truetype"; + /* Parse the command line arguments. */ for (i = 1; i < argc; i++) @@ -562,6 +564,11 @@ main (int argc, char **argv) FATAL_ERROR ("Fail to open the file %s!\n", argv[i]); filename = basename (argv[i]); } + else if (! strcmp (argv[i], "--fontset")) + { + fontset_name = argv[++i]; + } + else { fprintf (stderr, "Unknown or invalid option: %s\n", argv[i]); @@ -596,7 +603,7 @@ main (int argc, char **argv) { MPlist *plist = mplist (), *p; - MFontset *fontset = mfontset ("truetype"); + MFontset *fontset = mfontset (fontset_name); MFace *face = mface (); mface_put_prop (face, Mfontset, fontset); -- 1.7.10.4