On 06/03/2015 08:54 PM, Marc Lehmann wrote:
On Wed, Jun 03, 2015 at 03:31:43PM -0500, "Estrada, Zachary J"
<[email protected]> wrote:
It looks like I cannot get the letter spacing to update dynamically using
the escape sequence:
Makes sense, the resource will be ignored - have you tried the letterSpace
method from my first reply that sets the internal letterSpace value?
Does this method allow one to set a value?
$self->letterSpace ($spacing);
inside an on_user_command hook gives:
----
urxvt: Usage: urxvt::term::letterSpace(THIS) at (eval 12) line 4.
---
Sorry, I'm quite new to urxvt's internals and these perl extensions, so I'm not
sure where to go from here. I only saw mention of the letterSpace method in
rxvtperl.xs that returns and int and only has the THIS arg (if I'm reading it
correctly, it's around line 1409 after the patch).
Also, I couldn't get the rxvtperl.xs to work, even with the blank lines. I'm
using "$term->set_fonts();" to access it, is there something else I should
be diong?
---
urxvt: Can't locate object method "set_fonts" via package "urxvt::term" at
(eval 14) line 4.
Sorry, my fault - putting it at the end puts it
into the urxvt::pixbuf package. Try this patch:
http://ue.tst.eu/8df5f9d6ea91621d388005ad4e0fb21b.txt
I can now call set_fonts - thanks!
I was wondering if there's a better way to achieve this goal. Ideally, I
would use the dimensions of the window to calculate the maximum font size
and appropriate spacing for a given width. I've been attempting this brute
force solution since I thought it would be easier to implement, but maybe
I'm mistaken - is there a better approach I could take?
I hope I understand you correctly.
urxvt itself only knows the exact size when it gets the base fontset and
calculates its size from there. "Guessing" in advance what font size is
the right one is going to be hard, you'd have to copy how urxvt sizes the
grid cell, and for xft fonts, this could become rather complicated (well,
its already going to be complicated with core fonts).
OTOH, you can specify transformation matrices and similar things for xft
fonts, maybe you should look into this. With a suitable font, you might be
able to calculate the font size and letterspacing in advance.
It's not going to be easy, though.
Agreed on the guessing being difficult, just wanted to make sure I wasn't doing
something crazy the wrong way. I am using an xft font already, I can definitely
read up on this, but it seems like based on your experience the "brute force"
approach would be better as a first attempt.
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode