static Bool zoomto96dpi = TRUE; /* Zoom pages to always emulate 96dpi */
static Bool runinfullscreen = FALSE; /* Run in fullscreen mode by default */
-static guint defaultfontsize = 12;
+static guint defaultfontsize = 12; /* Default font size */
+static gfloat zoomlevel = 1.0; /* Default zoom level */
/* Webkit default features */
static Bool enablescrollbars = TRUE;
.RB [-r\ scriptfile]
.RB [-t\ stylefile]
.RB [-u\ useragent]
+.RB [-z\ zoomlevel]
.RB "URI"
.SH DESCRIPTION
surf is a simple Web browser based on WebKit/GTK+. It is able
.TP
.B \-x
Prints xid to standard output. This can be used to script the browser by using
+.TP
+.B \-z zoomlevel
+Specify the
+.I zoomlevel
+which surf should use.
.BR xprop(1).
.SH USAGE
.B Escape
webkit_web_view_set_zoom_level(c->view, dpi/96);
}
}
+ /* This might conflict with _zoomto96dpi_. */
+ if(zoomlevel != 1.0)
+ webkit_web_view_set_zoom_level(c->view, zoomlevel);
if(enableinspector) {
c->inspector = WEBKIT_WEB_INSPECTOR(
usage(void) {
die("usage: %s [-bBfFgGiIkKnNpPsSvx]"
" [-c cookiefile] [-e xid] [-r scriptfile]"
- " [-t stylefile] [-u useragent] [uri]\n", basename(argv0));
+ " [-t stylefile] [-u useragent] [-z zoomlevel]"
+ " [uri]\n", basename(argv0));
}
static void
case 'x':
showxid = TRUE;
break;
+ case 'z':
+ zoomlevel = strtof(EARGF(usage()), NULL);
+ break;
default:
usage();
} ARGEND;