summaryrefslogtreecommitdiff
path: root/xlsfonts.c
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-01-03 01:06:35 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-01-03 01:06:35 +0000
commit105875357c72e58dea0fa50c3746f8f62e2b4243 (patch)
tree9147a4be340d467108478dfc9ef1645ca2686e2c /xlsfonts.c
parentae8577dff6379de49740660194e5e8d0b33bca58 (diff)
xc/lib/XprintAppUtil/xpapputil.h xc/lib/XprintUtil/xprintutil.c xc/lib/XprintUtil/xprintutil.h xc/programs/glxgears/glxgears.c xc/programs/xdbedizzy/xdbedizzy.c xc/programs/xedit/Xedit-xprint.ad xc/programs/xedit/commands.c xc/programs/xlogo/print.c xc/programs/xlsfonts/xlsfonts.c xc/programs/xlsfonts/xlsfonts.man xc/programs/xlsfonts/xlsfonts.sgml xc/programs/xman/Xman-xprint.ad xc/programs/xman/handler.c xc/programs/xman/print.c xc/programs/xman/print.h xc/programs/xmore/XMore.ad xc/programs/xmore/print.c xc/programs/xmore/print.h xc/programs/xmore/printdialog.c xc/programs/xmore/printdialog.h xc/programs/xmore/printdialogprivates.h xc/programs/xmore/xmore.c xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c xc/programs/xphelloworld/xphelloworld/xphelloworld.c xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.c xc/programs/xplsprinters/xplsprinters.c //bugs.freedesktop.org/show_bug.cgi?id=1706) attachment #1615 (https://bugs.freedesktop.org/attachment.cgi?id=1615): XprintUtils 2004/Q3 update. This adds various new features to the XprintUtils library including support for page resolutions where X_resolution!=Y_resolution, listfonts-mode control and initial framework for the COLORSPACE extension. Patch by Roland Mainz <roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>.
Diffstat (limited to 'xlsfonts.c')
-rw-r--r--xlsfonts.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xlsfonts.c b/xlsfonts.c
index 9718c93..4e2be2b 100644
--- a/xlsfonts.c
+++ b/xlsfonts.c
@@ -93,6 +93,7 @@ void usage(void)
fprintf (stderr, " -1 force single column\n");
fprintf (stderr, " -u keep output unsorted\n");
#ifdef BUILD_PRINTSUPPORT
+ fprintf (stderr, " -r resolution set print resolution\n");
fprintf (stderr, " -b list printer builtin fonts\n");
fprintf (stderr, " -B do not list printer builtin fonts\n");
fprintf (stderr, " -g list glyph fonts\n");
@@ -173,6 +174,29 @@ int main(int argc, char **argv)
sort_output = False;
break;
#ifdef BUILD_PRINTSUPPORT
+ case 'r':
+ {
+ const char *resname;
+ XpuResolutionList rlist;
+ int num_rlist;
+ XpuResolutionRec *res;
+
+ if (--argc <= 0) usage ();
+ argv++;
+ resname = argv[0];
+
+ if (!printer_output)
+ Fatal_Error("Option '%c' only supported for printers.", argv[0][i]);
+ rlist = XpuGetResolutionList(dpy, pcontext, &num_rlist);
+ if (!rlist)
+ Fatal_Error("Could not get list of supported resolutions (Server configuration error ?).");
+ res = XpuFindResolutionByName(rlist, num_rlist, resname);
+ if (!res)
+ Fatal_Error("Could not find resolution '%s'.", resname);
+ XpuSetDocResolution(dpy, pcontext, res);
+ XpuFreeResolutionList(rlist);
+ }
+ goto next;
case 'b':
mode = "xp-list-internal-printer-fonts";
if (!printer_output)