On Wed, Jun 03, 2015 at 11:20:05AM -0500, "Estrada, Zachary J" <[email protected]> wrote: > Short version: > I'm developing an extension and am running into trouble. I have two > (hopefully quick) questions: > 1) How can I set letter spacing dynamically? > $term->resource(letterSpace => $spacing); #Does not appear to change > anything
$term->letterSpace ($spacing); This should do the trick of updating it, but it will not cause a relayout: > 2) If I update sizing information in an on_user_command hook, $term->ncol > does not get updated. Calling $term->want_refresh() doesn't seem to update > it. What can I do? Right, the refresh really just refreshes the text, it doesn't relayout due to window size or font changes. The right thing to do would probably be to call set_fonts, which you cannot, at the moment, do from an extension. We can add this for the next release though. In the meantime, you could hack your way around this by re-setting fonts with the font change OSC sequence (e.g. using $term->cmd_parse). I didn't test this, but it should do the tirck, as steting a new fontset will make urxvt take letterSpace into account. You can also add an interface yourself and recompile urxvt, by adding this to the end of src/rxvtperl.xs (there need to be a newlines around it): void rxvt_term::set_fonts () Before we expose this, we might want to rename the method though, so both methods are likely temporary. > This adventure started with this question: > http://unix.stackexchange.com/questions/183343/urxvt-force-column-width Interesting problem. > I would like to automatically resize the contents (font size, letter > spacing) of a terminal to maintain a desired width with arbitrary window > dimensions (useful with tiling window managers). I realize this may appear > ugly with mismatched window and font geomtry, but for my common case it > should work fine. Only one way to find out, I can imagine it would be a funny effect to have, regardless of its limitations. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / [email protected] -=====/_/_//_/\_,_/ /_/\_\ _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode
