Writing in 2016, talking about xterm patch #278 (released in 2012):
xterm uses a single font, rather than font sets which are supported by several other terminals. The pseudo-graphic characters in this (pasted from xterm):
⎛ ⎽⎽⎽⎽⎽⎽⎽ ⎞
⎜ ╱ 3 ⎟
⎜ ╱ x ⎟
⎜ ╱ ───── , 1⎟
⎝╲╱ x + 1 ⎠
are not provided by the TypeType font specified here:
xterm.vt100.faceName: Terminus
xterm.vt100.faceSize: 14
Other terminals, given that font would provide those characters from another font.
The way to make xterm work is
- specify a font which does cover all of the characters needed, and
- tell it to use UTF-8 encoding.
The latter is addressed for most users by the default setting of the locale
resource: xterm will (usually) use UTF-8 encoding. But the default behavior is VT100-compatible, hence the use of ISO-8859-1 compatible fonts.
- Terminus uses more glyphs than that, but falls far short of covering all pseudo-graphics in Unicode.
- The ones that display as
n
are U+239B, U+239C, U+239D, U+239E, U+23A0.
- The version of Terminus in Debian 7 (and Debian testing) has less than 256 glyphs and happens to show
n
as described in the question.
That happens because (although xterm knows that the glyphs are missing), it has printed the string using the font, assuming that (like most other fonts) missing entries will be shown as blanks. In this case, the freetype library seems to be mapping the low-order byte of the Unicode values into the range that Terminus supports. That happens to fall in a range that the font displays as n
(for "no such character"):
The quick workaround uses the uxterm
script, which selects a different font and ensures that UTF-8 encoding is used.
Further reading:
Terminus Font is a clean, fixed width bitmap font, designed for long (8 and more hours per day) work with computers. Version 4.40 contains 1241 characters, covers about 120 language sets and supports ISO8859-1/2/5/7/9/13/15/16, Paratype-PT154/PT254, KOI8-R/U/E/F, Esperanto, many IBM, Windows and Macintosh code pages, as well as the IBM VGA, vt100 and xterm pseudographic characters.
The above was talking about xterm patch #278 which was four years old in 2016. Development of xterm is ongoing, and beginning with patch #338 (late 2018) there is support for TrueType fontsets. Here is a screenshot using the OP's resource-settings from xterm patch #342 (#343 will probably be out "soon"):
Using the -report-fonts
option, I see that it loaded these font-files (treating bold/italic as the "same" as normal, and using a second font for the special characters):
file=/usr/share/fonts/X11/misc/ter-u18n\_iso-8859-1.pcf.gz
file=/usr/share/fonts/X11/misc/ter-u18b\_iso-8859-1.pcf.gz
file=/usr/share/fonts/X11/misc/ter-u18n\_iso-8859-1.pcf.gz
file=/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
The actual number of fonts depends on what you want to do. In testing the existing range of Unicode values, it may use a couple of dozen fonts.
You have hinted the answer yourself by referencing https://en.wikipedia.org/wiki/Fixed_(typeface)
This is the standard fixed bitmap font which has been expanded by Markus Kuhn to have a rather complete character set. The question is then how to scale a bitmap.
What you have achieved so far is scaling a vector font and converting it to a bitmap (ttf → bdf → pcf). That is a fine strategy but as you mention it lacks some language support. That seems strange as Courier New is one of the more unicode complete fonts but I digress! Maybe try using Mono which is a clone.
I do however not understand why you are doing this as xterm does support truetype.
Modify ~/.Xresources
such as this (note that you'll need to reload it using xrdb as seen in another answer to this question):
XTerm*renderFont: true
XTerm*faceName: VeraMono
XTerm*faceSize: 10
But back to the task: You want a larger bitmap font.
The largest available bitmap available is:
10x20 -Misc-Fixed-Medium-R-Normal--20-200-75-75-C-100-ISO10646-1
Markus have been so nice that he supplies the source BDF files. If your distribution does not have the most recent updates (from April 2009) you can grab the package directly from him.
The "-misc-fixed-*" font package:
http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz
Rather than converting back and forth between pcf and bdf you could/should stick to the source format. You can use a BDF font editor to resize the font. Do not expect any antialiasing or such trickery - but at least you can get a readable size.
Or you can use bdfresize by Hiroto Kagotani (also found in some package systems).
UPDATE:
I do not know of a way to scale just one window (never had the need). You could track this Superuser question. When I have had the need I have scaled the entire environment.
You can downgrade a 3200x1800 display to 1920x1080 using:
xrandr --dpi 141
xrandr --output eDP1 --scale 0.6x0.6
Other tricks for screen scaling in different window managers can be found here. They suggest using VNC:
One approach is to run the application full screen and without
decoration in its own VNC desktop. Then scale the viewer. With Vncdesk
(vncdesk-git from the AUR) you can set up a desktop per
application, then start server and client with a simple command such
as vncdesk 2
.
x11vnc has an experimental
option -appshare
, which opens
one viewer per application window. Perhaps something could be hacked
up with that.
Best Answer
The
appres
utility lists the resources used by an application, both user and default.The first argument is the class name (
xterm -class Xxx
). The second argument, which is optional, is the instance name (xterm -name xxx
).The “Large” font is
.VT100.font5
or.VT100.utf8Fonts.font5
. See the manual for whether.utf8Fonts
is used, it's a bit complex. If you have more than one among*.VT100.font5
and?.VT100.font5
andXTerm.VT100.font5
andxterm.VT100.font5
, the last one in this list applies; see the X documentation for the gory details of resource name precedence.