Переключите жирный шрифт в Urxvt во время выполнения

468
qubodup

Как видно из справочной страницы, можно переключить шрифт в Urxvt, используя:

printf '\33]50;%s\007' "xft:Terminus:pixelsize=20" 

Однако наличие следующей строки ~/.Xdefaultsприведет к тому, что жирные шрифты не изменятся:

urxvt*boldFont: xft:terminus:pixelsize=13 

Странное сочетание шрифтов в Urxvt

Как декодировать \33]50;%s\007и какой код использовать, чтобы жирные шрифты менялись?

0

1 ответ на вопрос

1
Thomas Dickey

The command to use for changing bold fonts is:

printf '\33]711;%s\007' "xft:Terminus:pixelsize=20" 

The \33]50;%s\007 is close, but not the right place to look. For whatever reason, the link you reference is pointing to an incomplete page. This copy of urxvt(7) lists the code 711 which you would use to specify that the bold font should be changed, e.g., using

\033]711;%s\007 

The manual page documents codes 50 and 711 respectively as

Ps = 50
Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n

and

Ps = 711
Set bold fontset to Pt. Similar to Ps = 50 (Compile styles).

By the way, the given font specification

"xft:Terminus:pixelsize=20" 

looks odd: one would expect something like this because you are asking for a bold font:

"xft:Terminus:pixelsize=20:style=bold" 

Похожие вопросы