2

For some reason I can't get unicode fonts to work inside of xterm when I start it from the xquartz applications tab as shown below: enter image description here

I have tried setting the command to xterm -u8 but the fonts are still missing. However if I create a new xterm window from a current window with xterm -u8 the new window correctly displays the fonts.

What gives?

Craig
  • 901
  • 7
  • 18

1 Answers1

3

The menu shows

xterm -u8 -fa Mono -fs 9

and the comment about starting it from the command-line says

xterm -u8

Given that the question was asked in 2015, that would be no more recent than patch #320. Support for TrueType font sets (fallback fonts) was introduced in 2018, patch #338.

There are a few possibilities:

  • most of the TrueType fonts are not unicode fonts, but rather ISO-8859-1 with a handful of characters outside that set. You can see the coverage using

    xfd -fa Mono

  • without the -fa option, xterm defaults to bitmap-fonts, which may come with reasonably good Unicode coverage (depending on what you want).

  • your system locale may not use UTF-8 encoding; if your shell sets the locale in its initialization script, you can see differences

  • likewise, if your shell sets different locations for the resource files than the system, that can make a difference.

But likely the difference lies in the font choice. For instance, on my OSX machine, "Mono" is shown in xfd as Bitstream Vera Sans Mono-12:style=Roman, which (see Font Squirrel) has that sort of limited coverage.

There are TrueType fonts with good coverage (better, anyway). Since that version of xterm did not implement font sets, it shows only one font. Here are a few interesting links on the topic of TrueType versus Unicode:

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • I think the latter 2 possibilities are the likely culprits. Are you familiar with how I can modify the system locale instead of waiting for my .bash_profile or .zshrc to be read? I worried that someone would pick up on the -fa, but I have tried it both ways it doesn't change the results in either case. – Craig Sep 16 '15 at 00:39
  • You might get this to work by modifying `/etc/profile`. – Thomas Dickey Sep 16 '15 at 01:20
  • one comment to add to this after all this years, `uxterm` might provide a better UTF-8 support – Shahar Hadas May 12 '23 at 20:37