Linux xterm font size

How to increase the font size in xterm [duplicate]

This has been discussed here: askubuntu.com/questions/161652/… — and my favorite is ctrl-right-click for a quick temporary change.

1 Answer 1

The fontMenu pops up when when the “control” key and pointer button three are pressed in a window.

It sets the font used in the VT102 window, or modifies the way the font is specified or displayed. There are several sections.

The first section allows you to select the font from a set of alternatives:

Set the font to the default, i.e., that given by the *VT100.font resource.

Set the font to that given by the *VT100.font1 resource.

Set the font to that given by the *VT100.font2 resource.

Set the font to that given by the *VT100.font3 resource.

Set the font to that given by the *VT100.font4 resource.

Set the font to that given by the *VT100.font5 resource.

Set the font to that given by the *VT100.font6 resource.

This allows you to set the font last specified by the Set Font escape sequence (see the document Xterm Control Sequences).

This allows you to set the font specified the current selection as a font name (if the PRIMARY selection is owned).

The second section allows you to modify the way it is displayed:

This is normally checked (enabled). When unchecked, xterm will not use bold fonts. The setting corresponds to the allowBoldFonts resource.

Line-Drawing Characters (font-linedrawing)

When set, tells xterm to draw its own line-drawing characters. Otherwise it relies on the font containing these. Compare to the forceBoxChars resource.

When set, tells xterm to use the minimum glyph-width from a font when displaying characters. Use the maximum width (unchecked) to help display proportional fonts. Compare to the forcePackedFont resource.

Doublesized Characters (font-doublesize)

When set, xterm may ask the font server to produce scaled versions of the normal font, for VT102 double-size characters.

Читайте также:  Linux посмотреть параметры загрузки ядра

The third section allows you to modify the way it is specified:

TrueType Fonts (render-font)

If the renderFont and corresponding resources were set, this is a further control whether xterm will actually use the Xft library calls to obtain a font.

This controls whether xterm uses UTF-8 encoding of input/output. It is useful for temporarily switching xterm to display text from an application which does not follow the locale settings. It corresponds to the utf8 resource.

This controls whether xterm uses UTF-8 fonts for display. It is useful for temporarily switching xterm to display text from an application which does not follow the locale settings. It combines the utf8 and utf8Fonts resources.

This controls whether xterm accepts UTF-8 encoding for title control sequences. It corresponds to the utf8Fonts resource.

Initially the checkmark is set according to both the utf8 and utf8Fonts resource values. If the latter is set to “always”, the checkmark is disabled. Likewise, if there are no fonts given in the utf8Fonts subresources, then the checkmark also is disabled.

The standard XTerm app-defaults file defines both sets of fonts, while the UXTerm app-defaults file defines only one set. assuming the standard app-defaults files, this command will launch xterm able to switch between UTF-8 and ISO-8859-1 encoded fonts:

The fourth section allows you to enable or disable special operations which can be controlled by writing escape sequences to the terminal. These are disabled if the SendEvents feature is enabled: Allow Color Ops (allow-font-ops)

This corresponds to the allowColorOps resource. Enable or disable control sequences that set/query the colors.

Allow Font Ops (allow-font-ops)

This corresponds to the allowFontOps resource. Enable or disable control sequences that set/query the font.

Allow Tcap Ops (allow-tcap-ops)

Enable or disable control sequences that query the terminal’s notion of its function-key strings, as termcap or terminfo capabilities. This corresponds to the allowTcapOps resource.

Allow Title Ops (allow-title-ops)

Enable or disable control sequences that modify the window title or icon name. This corresponds to the allowTitleOps resource.

Allow Window Ops (allow-window-ops)

Enable or disable extended window control sequences (as used in dtterm). This corresponds to the allowWindowOps resource.

Источник

Настройка Xterm

XTerm, являясь самой популярной программой в среде X Window System, обладает несколькими замечательными возможностями.

Настройка XTerm

XTerm не является эмулятором терминала; это окно оболочки .

Постоянно действующие параметры XTerm указываются, как правило, в файле ресурсов, а редко используемые параметры — в командной строке.

Возможности

  • одновременно запускать несколько окон оболочки;
  • регулировать размер каждого окна xterm;
  • изменять размер и цвет шрифтов, используемых xterm;
  • выполнять операции копирования/вставки текста между окнами xterm и других программ X;
  • использовать полосу прокрутки для просмотра текста, находящегося за пределами окна.
Читайте также:  Linux operating system and version

Параметры командной строки

Параметр Назначение
-bg Цвет фона (по умолчанию — белый)
-cr Цвет текстового курсора (по умолчанию — белый)
-display имя_узла:0 Подключение к Х серверу на данном узле
-e программа [аргументы] Вместо оболочки в окне запускается программа
-fg цвет Цвет текста (по умолчанию — черный)
-fn имя шрифта Выбор указанного шрифта
-geometry геометрия Выбор размеров и местонахождения окна
-ls Запуск оболочки в режиме регистрации
-sb Включение полосы прокрутки

Размеры окна XTerm

Размеры окна xterm проще всего регулируются с помощью параметра командной строки -geometry:

~$ xterm -geometry WidthxHeight

Значение Width соответствует ширине окна в символах, а значение Height — высоте окна (количеству строк).

Многие приложения X, поддерживая параметр -geometry, интерпретируют его как размер в пикселах.

В параметре -geometry можно также задать начальную позицию окна в пикселах:

~$ xterm -geometry WidthxHeight+X+Y

В данном случае X и Y определяют координаты левого верхнего угла окна программы в пикселах. Началом координат считается левый верхний угол экрана.

Как размеры (ширина и высота), так и координаты (X и Y) могут пропускаться.

Полоса прокрутки для XTerm

По умолчанию в окно xterm не включается полоса прокрутки. Для ее включения используется параметр командной строки -sb:

Средняя кнопка мыши осуществляет прокрутку к нужной позиции. Правая кнопка выполняет прокрутку назад, а левая — вперед.

Параметры командной строки могут быть и постоянными. В качестве примера привожу фрагмент меню fluxbox:

~ mcedit .fluxbox/menu . [exec] (xterm) . 

Файл ресурсов X

Файлы ресурсов X предоставляют собой мощный механизм для настройки практически любого приложения X.

Для внесения в файл ресурсов всех необходимых параметров он может быть просто скопирован в домашний каталог и затем отредактирован:

~ copy /usr/X11/app-defaults/XTerm .

Фрагмент содержимого файла XTerm:

~ less XTerm . XTerm*foreground: gray XTerm*background: black XTerm*cursorColor: green XTerm*scrollBar: True XTerm*saveLines: 800 XTerm*font: -misc-fixed-medium-r-normal-*-15-140-75-75-c-90-iso10646-* XTerm*geometry: 103x46+0+17 . 

Пример окна XTerm

Здесь мной были выбраны: серый цвет шрифта, черный цвет фона, зеленый — курсора, полоса прокрутки, содержимое буфера в 800 строк, шрифт fixed для кодировки utf8, геометрия окна 103×46 символов, координаты 0, 17 px.

Шрифты и цвета XTerm

Программа xlsfonts

Программой xlsfonts можно вывести список всех доступных шрифтов:

~ xlsfonts | less -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso10646-1 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-10 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-13 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-14 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-15 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-2 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-3 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-4 -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-9 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso10646-1 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-10 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-13 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-14 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-15 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-2 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-3 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-4 -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-9 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso10646-1 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso10646-1 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-1 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-1 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-10 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-10 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-13 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-13 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-14 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-14 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-15 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-15 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-2 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-2 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-3 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-3 -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-4 lines 1-37 

Для окна XTerm следует выбирать шрифт с фиксированной шириной символов (моноширинный), например Courier или Lucida.

Читайте также:  Чем вылечить linux диск

В очень длинных именах моноширинных шрифтов обычно присутствует суффикс m или с.

Программа xfontsel

Для выбора шрифтов весьма удобна программа xfontsel:

Графическая программа xfontsel

Выбор параметров в ней рекомендую начинать с выбора кодировки, которая для utf8, например, будет следующей:

Выбор кодировки в xfontsel

Далее выбирается шрифт с необходимыми параметрами:

Выбор шрифта и его параметров в xfontsel

Затем нажимается кнопка select

Теперь имя выбранного шрифта можно вставить в другое окно.

Цветной XTerm

Цветной XTerm

Все настройки находятся в файлах: .bash_profile и .bashrc домашнего каталога.

Меню XTerm

По умолчанию у xterm отсутствует строка меню. Для получения доступа к одному из трёх меню xterm необходимо, удерживая клавишу Control, нажать левую (lb), среднюю (mb) или правую (rb) клавишу мыши. Пример:

Выбор меню xterm

Выбор опции в меню xterm

Поддержку строки меню можно задать во время компиляции программы; в этом случае указанные выше меню будут доступны из строки меню.

Источник

Как в xterm установить размер шрифта

Пускаю xterm с параметром -fs=, где N=12,14. 20, но на размер шрифта это никак не влияет 🙁 Что не так?

Re: Как в xterm установить размер шрифта

Шрифт можно задать в ~/.Xdefaults, например:
xterm*font: -*-terminus-medium-r-normal-*-16-*-*-*-*-*-koi8-r

*-terminus-medium-r-normal-*-16-*-*-*-*-*-koi8-r замени на шрифт который есть в твоей системе (можно подобрать с помощью xfontsel), 16 — размер шрифта.

Re: Как в xterm установить размер шрифта

> xterm*font: -*-terminus-medium-r-normal-*-16-*-*-*-*-*-koi8-r

А если я сегодня хочу 16, а завтра 14, мне каждый раз ~/.Xdefaults переписывать? Я хочу из командной строки задавать размер. Shift+KP_Plus/Minus меняет размер шрифта, но каждый раз тыкать кнопки неудобно.

Re: Как в xterm установить размер шрифта

xterm -fn ‘*-terminus-medium-r-normal-*-16-*-*-*-*-*-koi8-r’

Re: Как в xterm установить размер шрифта

> xterm -fn ‘*-terminus-medium-r-normal-*-16-*-*-*-*-*-koi8-r’

Хм, получается достаточно длинно. Не сочтите меня за привереду, но я всё-таки не пойму, почему не работает параметр -fs?

Re: Как в xterm установить размер шрифта

-fs size This option sets the pointsize for fonts selected from the FreeType library if support for that library was compiled into xterm. This corresponds to the faceSize resource. Перевод каждого слова на русский -- 100 руб. :)

Re: Как в xterm установить размер шрифта

Сам незнаю почему не работет -fs. В man’е написано: -fs size This option sets the pointsize for fonts selected from the FreeType library if support for that library was compiled into xterm. This corresponds to the faceSize resource.

Возможно xterm скомпилирован без поддержки FreeType. А со слишком длинными командами можно бороться с помощью alias’ов или повесь их на ноткеи.

Re: Как в xterm установить размер шрифта

Если поддержка FreeType включена, то ты должен использовать опцию -fa для задания паттерна шрифта, и тогда -fs будет работать.

Re: Как в xterm установить размер шрифта

Источник

Оцените статью
Adblock
detector