mirror of
https://github.com/gryf/urxvt-font.git
synced 2026-03-22 21:33:34 +01:00
adding urxvt font classes
This commit is contained in:
11
font
11
font
@@ -106,7 +106,10 @@ sub change_size
|
|||||||
|
|
||||||
# Get xft strings with font size {+/-}1
|
# Get xft strings with font size {+/-}1
|
||||||
my ($font_resized) = $self->_resize_xft_string( "font", $delta);
|
my ($font_resized) = $self->_resize_xft_string( "font", $delta);
|
||||||
|
my ($font_resized_im) = $self->_resize_xft_string( "imFont", $delta);
|
||||||
my ($font_resized_bold) = $self->_resize_xft_string( "boldFont", $delta);
|
my ($font_resized_bold) = $self->_resize_xft_string( "boldFont", $delta);
|
||||||
|
my ($font_resized_italic) = $self->_resize_xft_string( "italicFont", $delta);
|
||||||
|
my ($font_resized_bold_italic) = $self->_resize_xft_string( "boldItalicFont", $delta);
|
||||||
|
|
||||||
# Update internal urxvt resource hash
|
# Update internal urxvt resource hash
|
||||||
# This is necessary or else the next resize won't have an updated
|
# This is necessary or else the next resize won't have an updated
|
||||||
@@ -114,7 +117,10 @@ sub change_size
|
|||||||
# but boldFont is *not*, at least with the escape sequences I'm
|
# but boldFont is *not*, at least with the escape sequences I'm
|
||||||
# emitting.
|
# emitting.
|
||||||
$self->{term}->resource( "font", $font_resized);
|
$self->{term}->resource( "font", $font_resized);
|
||||||
|
$self->{term}->resource( "imFont", $font_resized_im);
|
||||||
$self->{term}->resource( "boldFont", $font_resized_bold);
|
$self->{term}->resource( "boldFont", $font_resized_bold);
|
||||||
|
$self->{term}->resource( "italicFont", $font_resized_italic);
|
||||||
|
$self->{term}->resource( "boldItalicFont", $font_resized_bold_italic);
|
||||||
|
|
||||||
# Emit escape sequence to change fonts in rxvt runtime
|
# Emit escape sequence to change fonts in rxvt runtime
|
||||||
$self->{term}->cmd_parse("\e]710;" . $font_resized . "\007");
|
$self->{term}->cmd_parse("\e]710;" . $font_resized . "\007");
|
||||||
@@ -124,7 +130,10 @@ sub change_size
|
|||||||
open(XRDB_MERGE, "| xrdb -merge") || die "can't fork: $!";
|
open(XRDB_MERGE, "| xrdb -merge") || die "can't fork: $!";
|
||||||
local $SIG{PIPE} = sub { die "xrdb pipe broke" };
|
local $SIG{PIPE} = sub { die "xrdb pipe broke" };
|
||||||
print XRDB_MERGE "urxvt\*font: $font_resized\n"
|
print XRDB_MERGE "urxvt\*font: $font_resized\n"
|
||||||
. "urxvt\*boldFont: $font_resized_bold\n";
|
. "urxvt\*imFont: $font_resized_im\n"
|
||||||
|
. "urxvt\*boldFont: $font_resized_bold\n"
|
||||||
|
. "urxvt\*italicFont: $font_resized_italic\n"
|
||||||
|
. "urxvt\*boldItalicFont: $font_resized_bold_italic\n";
|
||||||
close XRDB_MERGE || die "bad xrdb: $! $?";
|
close XRDB_MERGE || die "bad xrdb: $! $?";
|
||||||
system("xrdb -edit " . X_RESOURCES);
|
system("xrdb -edit " . X_RESOURCES);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user