xterm displaying two chars for one, 2nd looks to be a space

Thomas Dickey dickey at his.com
Mon Mar 19 08:44:54 UTC 2018


On Sun, Mar 18, 2018 at 03:24:33PM -0500, Bob Willcox wrote:
> On Sun, Mar 18, 2018 at 10:22:59AM -0400, Thomas Dickey wrote:
> > On Sun, Mar 18, 2018 at 09:03:37AM -0500, Bob Willcox wrote:
> > > Hi All,
> > > 
> > > I just did an new install of the latest Freebsd 12.0-CURRENT:
> > > 
> > > FreeBSD anakin.immure.com 12.0-CURRENT FreeBSD 12.0-CURRENT #1 r331115: Sun Mar 18 06:58:19 CDT 2018     bob at anakin.immure.com:/usr/obj/usr/src/amd64.amd64/sys/ANIKIN  amd64
> > > 
> > > and have installed xorg-7.7_3. My window manager is ctwm-4.0.1,1 and xterm is
> > > xterm-331.
> > > 
> > > Now for my problem: when I start up an xterm in X from ctwm I get two
> > > characters for every one entered, with the second one being a space.
> > > 
> > > For example, when typing in hello in an xterm window it displays as
> > > 
> > > h e l l o
> > 
> > It could do that if the font-metrics say it's that wide, even if (almost)
> > none of the glyphs actually say that.
> 
> Thanks for your reply Thomas, but I'm afraid I'm not following what you say
> here. I'm not not very familiar with fonts so I'm confused by your comment "if
> the font-metrics say it's that wide".
> 
> Note that I've been using the same xinitrc, Xdefaults, and ctwmrc files since
> the mid '90s and have never had this behavior.

I was referring to the fact that besides xterm, there are other components
which can produce the problem (the font files, the libraries reading the
font files and the locale support).  FreeBSD's had problems with locale
support for quite a while, plus freetype2 has made changes.  But "font
metrics" refers to the size of the glyphs in a font-file which are stored
in its header (and which freetype2 and/or fontconfig can (mis)interpret).
 
> > > However, if I specify a font with '-fn 10x20' on the xterm invocation I don't
> > > get the gratuitous spaces.
> > 
> > that's consistent with my remark above.
> > 
> > Also, it's possible (I suppose) that the change to use Unicode 10
> > last spring is aggravating the problem, but I'd have to study an
> > example to see exactly why.
> 
> Is there some way that I could revert that change or configure xterm to
> not use it?

I took a quick look for "downgrade freebsd package", and didn't see anything
obvious.  For development, I've adapted the port-files from FreeBSD in xterm's
sources, and have used those in my ports tree.  So what I'd do to get/test
and older version of xterm would be to tweak the PORTVERSION in the Makefile
(and checksums) using /usr/ports/x11/xterm as a starting point.

Something like

	cd /usr/ports/x11/xterm
	sudo make

to get the dist-files for the current version on the disk, then copy the
version of "xterm-XXX.tgz" from
	ftp://ftp.invisible-island.net/xterm/
to
	cd /usr/ports/distfiles

and
	sudo vi Makefile

to change the PORTVERSION number, and referring to

https://www.freebsd.org/doc/en/books/porters-handbook/porting-checksum.html

	sudo make makesum
	sudo make clean
	sudo make
	sudo make install

The change to use Unicode 10 was in xterm #330, so you might consider #329.

-- 
Thomas E. Dickey <dickey at invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20180319/9e99ac71/attachment.sig>


More information about the freebsd-x11 mailing list