diff --git a/xterm/config b/xterm/config index b6693259a..f34f53b0f 100644 --- a/xterm/config +++ b/xterm/config @@ -1,4 +1,5 @@ xterm=xterm-256color +fontsize=15 base_port=555 rcfile=0 locale=0 diff --git a/xterm/config.info b/xterm/config.info index 6d098b138..c2dc2c77a 100644 --- a/xterm/config.info +++ b/xterm/config.info @@ -1,5 +1,6 @@ xterm=Set TERM environmental variable to,4,xterm+256color-xterm-256color,xterm+16color-xterm-16color,xterm-xterm,vt102-vt102,vt100-vt100,vt52-vt52,rxvt-rxvt,nsterm-nsterm,dtterm-dtterm,ansi-ansi size=Terminal width and height in characters,3,Automatic,5,,,Static (80x24) +fontsize=Adjust font size,4,0-Auto,12-Small,15-Normal,18-Large,21-Huge locale=Set shell character encoding,10,0-Shell default,1-en_US.UTF-8,Custom rcfile=Execute initialization commands from file,10,0-Shell default,1-Module default,Custom screen_reader=Enable screen reader mode,1,true-Yes,false-No diff --git a/xterm/index.cgi b/xterm/index.cgi index 749e3520b..6adbe919e 100755 --- a/xterm/index.cgi +++ b/xterm/index.cgi @@ -55,6 +55,7 @@ my $def_cols_n = 80; my $def_rows_n = 24; my $xmlhr = $ENV{'HTTP_X_REQUESTED_WITH'} eq "XMLHttpRequest"; my %term_opts; +my $font_size = $config{'fontsize'} || 15; # Parse module config my ($conf_cols_n, $conf_rows_n) = ($conf_size_str =~ /([\d]+)X([\d]+)/i); @@ -74,7 +75,9 @@ if ($conf_cols_n && $conf_rows_n && !$xmlhr) { # Define columns and rows my $conf_screen_reader = $config{'screen_reader'} eq 'true' ? 'true' : 'false'; -$termjs_opts{'Options'} = "{ cols: $env_cols, rows: $env_rows, screenReaderMode: $conf_screen_reader }"; +$termjs_opts{'Options'} = "{ cols: $env_cols, rows: $env_rows, ". + "screenReaderMode: $conf_screen_reader, ". + "fontSize: $font_size }"; my $term_size = " min-width: ".($conf_cols_n ? "".($conf_cols_n * 9)."px" : "calc(100vw - 22px)").";