From 395cb8ee6aaae70cbd48139b6eae72d1989e8fee Mon Sep 17 00:00:00 2001 From: root Date: Sat, 30 May 2009 08:51:23 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 +- doc/rxvt.1.man.in | 6 +++++ doc/rxvt.1.pod | 9 +++++++ doc/rxvt.7.pod | 2 +- src/feature.h | 5 ++++ src/init.C | 4 +++ src/main.C | 1 + src/rsinc.h | 1 + src/rxvt.h | 1 + src/rxvtperl.xs | 62 ++++++++++++++++++++++++----------------------- src/urxvt.pm | 6 ++--- src/xdefaults.C | 1 + 12 files changed, 65 insertions(+), 35 deletions(-) diff --git a/Changes b/Changes index 1f3a817b..c1027952 100644 --- a/Changes +++ b/Changes @@ -24,12 +24,12 @@ TODO: exg-- patch TODO: selection_beg/end should set screen, or so TODO: - upgrade to libev-xx TODO: -rv interacts badly with popups. -TODO: -letterspace option - port to glibc-2.10 changes (strchr etc. returning const char * in C++), based on patches by Milos Jakubicek and Oliver Mader. - the binary search algorithm to find precomposed characters was faulty, skipping some possible combinations (found by Mikachu). + - new -letterspace option, patch by Mark H. Wilkinson. - enable --mlock option for urxvt with frills on systems supporting it (patch by Russell Harmon). - urxvt did not compile without frills enabled diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in index 37a548fc..e795ce13 100644 --- a/doc/rxvt.1.man.in +++ b/doc/rxvt.1.man.in @@ -456,6 +456,12 @@ resource \fBskipBuiltinGlyphs\fR. Compile \fIfrills\fR: Lines (pixel height) to insert between each row of the display. Useful to work around font rendering problems; resource \&\fBlineSpace\fR. +.IP "\fB\-letsp\fR \fInumber\fR" 4 +.IX Item "-letsp number" +Compile \fIfrills\fR: Amount to adjust the computed character width by +to control overall letter spacing. Negative values will tighten up the +letter spacing, positive values will space letters out more. Useful to +work around odd font metrics; resource \&\fBletterSpace\fR. .IP "\fB\-tn\fR \fItermname\fR" 4 .IX Item "-tn termname" This option specifies the name of the terminal type to be set in the diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 3de6766c..5e89cd12 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -323,6 +323,10 @@ on a tab character is displayed as a wide cursor; resource B. Blink the cursor; resource B. +=item B<-uc>|B<+uc> + +Make the cursor underlined; resource B. + =item B<-iconic> Start iconified, if the window manager supports that option. @@ -1006,6 +1010,11 @@ movement only; option C<-ptab>. B: blink the cursor. B: do not blink the cursor [default]; option B<-bc>. +=item B I + +B: Make the cursor underlined. B: Make the cursor a box [default]; +option B<-uc>. + =item B I B: blank the pointer when a key is pressed or after a set number diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod index a6f51b5a..e546ee13 100644 --- a/doc/rxvt.7.pod +++ b/doc/rxvt.7.pod @@ -2443,7 +2443,7 @@ in combination with other switches) is: tripleclickwords (-tcw) settable insecure mode (-insecure) keysym remapping support - cursor blinking and underline cursor (-cb, -uc) + cursor blinking and underline cursor (-bc, -uc) XEmbed support (-embed) user-pty (-pty-fd) hold on exit (-hold) diff --git a/src/feature.h b/src/feature.h index df1af13b..3507ccae 100644 --- a/src/feature.h +++ b/src/feature.h @@ -378,6 +378,11 @@ */ #define LINESPACE 0 +/* + * Default number of extra dots between columns + */ +#define LETTERSPACE 0 + /* * Default number of lines in the scrollback buffer */ diff --git a/src/init.C b/src/init.C index 18b70b90..a352236e 100644 --- a/src/init.C +++ b/src/init.C @@ -295,6 +295,7 @@ rxvt_term::init_vars () int_bwidth = INTERNALBORDERWIDTH; ext_bwidth = EXTERNALBORDERWIDTH; lineSpace = LINESPACE; + letterSpace = LETTERSPACE; saveLines = SAVELINES; refresh_type = SLOW_REFRESH; @@ -450,6 +451,9 @@ rxvt_term::init_resources (int argc, const char *const *argv) if (rs[Rs_lineSpace] && (i = atoi (rs[Rs_lineSpace])) >= 0) lineSpace = min (i, std::numeric_limits::max ()); + + if (rs[Rs_letterSpace]) + letterSpace = atoi (rs[Rs_letterSpace]); #endif #ifdef POINTER_BLANK diff --git a/src/main.C b/src/main.C index 56122c1b..88bd0e57 100644 --- a/src/main.C +++ b/src/main.C @@ -690,6 +690,7 @@ rxvt_term::set_fonts () prop = (*fs)[1]->properties (); prop.height += lineSpace; + prop.width += letterSpace; fs->set_prop (prop, false); diff --git a/src/rsinc.h b/src/rsinc.h index 903a7716..0667bf8d 100644 --- a/src/rsinc.h +++ b/src/rsinc.h @@ -75,6 +75,7 @@ def (int_bwidth) def (borderLess) def (lineSpace) + def (letterSpace) def (cursorUnderline) def (urgentOnBell) #endif diff --git a/src/rxvt.h b/src/rxvt.h index e369e6f2..95a4f000 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -849,6 +849,7 @@ struct TermWin_t int int_bwidth; /* internal border width */ int ext_bwidth; /* external border width */ int lineSpace; /* number of extra pixels between rows */ + int letterSpace; /* number of extra pixels between columns */ int saveLines; /* number of lines that fit in scrollback */ int total_rows; /* total number of rows in this terminal */ int term_start; /* term lines start here */ diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 369e3cea..924981fb 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -1057,40 +1057,42 @@ rxvt_term::locale () #define TERM_OFFSET(sym) offsetof (TermWin_t, sym) -#define TERM_OFFSET_width TERM_OFFSET(width) -#define TERM_OFFSET_height TERM_OFFSET(height) -#define TERM_OFFSET_fwidth TERM_OFFSET(fwidth) -#define TERM_OFFSET_fheight TERM_OFFSET(fheight) -#define TERM_OFFSET_fbase TERM_OFFSET(fbase) -#define TERM_OFFSET_nrow TERM_OFFSET(nrow) -#define TERM_OFFSET_ncol TERM_OFFSET(ncol) -#define TERM_OFFSET_focus TERM_OFFSET(focus) -#define TERM_OFFSET_mapped TERM_OFFSET(mapped) -#define TERM_OFFSET_int_bwidth TERM_OFFSET(int_bwidth) -#define TERM_OFFSET_ext_bwidth TERM_OFFSET(ext_bwidth) -#define TERM_OFFSET_lineSpace TERM_OFFSET(lineSpace) -#define TERM_OFFSET_saveLines TERM_OFFSET(saveLines) -#define TERM_OFFSET_total_rows TERM_OFFSET(total_rows) -#define TERM_OFFSET_top_row TERM_OFFSET(top_row) +#define TERM_OFFSET_width TERM_OFFSET(width) +#define TERM_OFFSET_height TERM_OFFSET(height) +#define TERM_OFFSET_fwidth TERM_OFFSET(fwidth) +#define TERM_OFFSET_fheight TERM_OFFSET(fheight) +#define TERM_OFFSET_fbase TERM_OFFSET(fbase) +#define TERM_OFFSET_nrow TERM_OFFSET(nrow) +#define TERM_OFFSET_ncol TERM_OFFSET(ncol) +#define TERM_OFFSET_focus TERM_OFFSET(focus) +#define TERM_OFFSET_mapped TERM_OFFSET(mapped) +#define TERM_OFFSET_int_bwidth TERM_OFFSET(int_bwidth) +#define TERM_OFFSET_ext_bwidth TERM_OFFSET(ext_bwidth) +#define TERM_OFFSET_lineSpace TERM_OFFSET(lineSpace) +#define TERM_OFFSET_letterSpace TERM_OFFSET(letterSpace) +#define TERM_OFFSET_saveLines TERM_OFFSET(saveLines) +#define TERM_OFFSET_total_rows TERM_OFFSET(total_rows) +#define TERM_OFFSET_top_row TERM_OFFSET(top_row) int rxvt_term::width () ALIAS: - width = TERM_OFFSET_width - height = TERM_OFFSET_height - fwidth = TERM_OFFSET_fwidth - fheight = TERM_OFFSET_fheight - fbase = TERM_OFFSET_fbase - nrow = TERM_OFFSET_nrow - ncol = TERM_OFFSET_ncol - focus = TERM_OFFSET_focus - mapped = TERM_OFFSET_mapped - int_bwidth = TERM_OFFSET_int_bwidth - ext_bwidth = TERM_OFFSET_ext_bwidth - lineSpace = TERM_OFFSET_lineSpace - saveLines = TERM_OFFSET_saveLines - total_rows = TERM_OFFSET_total_rows - top_row = TERM_OFFSET_top_row + width = TERM_OFFSET_width + height = TERM_OFFSET_height + fwidth = TERM_OFFSET_fwidth + fheight = TERM_OFFSET_fheight + fbase = TERM_OFFSET_fbase + nrow = TERM_OFFSET_nrow + ncol = TERM_OFFSET_ncol + focus = TERM_OFFSET_focus + mapped = TERM_OFFSET_mapped + int_bwidth = TERM_OFFSET_int_bwidth + ext_bwidth = TERM_OFFSET_ext_bwidth + lineSpace = TERM_OFFSET_lineSpace + letterSpace = TERM_OFFSET_letterSpace + saveLines = TERM_OFFSET_saveLines + total_rows = TERM_OFFSET_total_rows + top_row = TERM_OFFSET_top_row CODE: RETVAL = *(int *)((char *)THIS + ix); OUTPUT: diff --git a/src/urxvt.pm b/src/urxvt.pm index 7e1cb75d..a01b0865 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -1300,9 +1300,9 @@ to see the actual list: borderLess chdir color cursorBlink cursorUnderline cutchars delete_key display_name embed ext_bwidth fade font geometry hold iconName imFont imLocale inputMethod insecure int_bwidth intensityStyles - italicFont jumpScroll lineSpace loginShell mapAlert meta8 modifier - mouseWheelScrollPage name override_redirect pastableTabs path perl_eval - perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay + italicFont jumpScroll lineSpace letterSpace loginShell mapAlert meta8 + modifier mouseWheelScrollPage name override_redirect pastableTabs path + perl_eval perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer scrollstyle diff --git a/src/xdefaults.C b/src/xdefaults.C index 7b70b292..97bf4c74 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -229,6 +229,7 @@ optList[] = { STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"), BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, 0, "borderless window"), STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"), + STRG (Rs_letterSpace, "letterSpace", "letsp", "number", "letter spacing adjustment"), #endif #ifdef BUILTIN_GLYPHS BOOL (Rs_skipBuiltinGlyphs, "skipBuiltinGlyphs", "sbg", Opt_skipBuiltinGlyphs, 0, "do not use internal glyphs"), -- 2.34.1