From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: 2QdxY4RzWzUUiLuE@potatochowder.com Newsgroups: gmane.emacs.help Subject: Re: displaying missing glyphs Date: Mon, 12 Apr 2021 12:19:07 -0700 Message-ID: References: <86mtu72zc6.fsf@x201.butler.org> <87pmz2ux0k.fsf@eder.anydns.info> <86y2dn1ldz.fsf@x201.butler.org> <86a6q31gvz.fsf@x201.butler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13447"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 12 21:20:55 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lW27D-0003PS-0P for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Apr 2021 21:20:55 +0200 Original-Received: from localhost ([::1]:37170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW27C-00036B-1a for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Apr 2021 15:20:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1lW25h-0002rQ-HW for help-gnu-emacs@gnu.org; Mon, 12 Apr 2021 15:19:21 -0400 Original-Received: from www458.your-server.de ([136.243.165.62]:42718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1lW25d-0000Qy-LO for help-gnu-emacs@gnu.org; Mon, 12 Apr 2021 15:19:21 -0400 Original-Received: from sslproxy01.your-server.de ([78.46.139.224]) by www458.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1lW25X-000Bns-RG for help-gnu-emacs@gnu.org; Mon, 12 Apr 2021 21:19:12 +0200 Original-Received: from [47.44.249.130] (helo=localhost) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1lW25X-000MPe-6D for help-gnu-emacs@gnu.org; Mon, 12 Apr 2021 21:19:11 +0200 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <86a6q31gvz.fsf@x201.butler.org> X-Authenticated-Sender: 2QdxY4RzWzUUiLuE@potatochowder.com X-Virus-Scanned: Clear (ClamAV 0.102.4/26138/Mon Apr 12 13:05:56 2021) Received-SPF: pass client-ip=136.243.165.62; envelope-from=2QdxY4RzWzUUiLuE@potatochowder.com; helo=www458.your-server.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128974 Archived-At: On 2021-04-12 at 13:45:20 -0500, Regarding "Re: displaying missing glyphs," Leo Butler wrote: > <2QdxY4RzWzUUiLuE@potatochowder.com> writes: > > > > > On 2021-04-12 at 12:08:08 -0500, > > Regarding "Re: displaying missing glyphs," > > Leo Butler wrote: > > > >> Andreas Eder writes: > >> > >> > On Fr 09 Apr 2021 at 11:32, Leo Butler wrote: > >> > > >> >> I use `emacs -nw` inside of screen inside of uxterm. Unfortunately, many > >> >> unicode glyphs are not displayed correctly (although they are if I > >> >> attach the screen session in gnome-terminal, for example). > >> >> > >> >> In emacs/elisp, how might I override the default empty box to display > >> >> something more informative? > >> > > >> > The problem is - most likely - a font that is not unicode capable. > >> > If you set uxterm to ise the same font as gnome-terminal then it should > >> > work. > >> > The same combination (uxterm, screen and emacs) works perfectly well > >> > here. > >> > >> Thanks for the suggestion. I have attached a marked-up screen shot of an > >> xterm (left) and gnome-terminal running `emacsclient -nw` and showing > >> the same buffer. You can see there is a noticeable clipping of some of > >> the characters in the xterm. > >> > >> According to lsof, gnome-terminal is using > >> > >> /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf > >> > >> so the xterm has been run using > >> > >> xterm -fa 'DejaVuSansMono' -fs 9 > >> > >> (and all font-related options are commented out in ~/.Xdefaults). > >> > >> FWIW, this is on a debian testing system with XTERM_LOCALE=en_US.UTF-8. > > > > At startup time, both programs have to determine the size of a character > > cell. They do so by applying some algorithm to the font(s) involved > > (the maximum width of all glyphs? the average width of selected glyphs? > > something else?). Evidently, xterm's algorithm doesn't account for all > > the glyphs, and ends up clipping some of them, whereas gnome-terminal > > has a different algorithm. > > That seems like a reasonable answer, although, because I am ignorant of > all things font-related, I would have thought the font would have > contained this information. > > > > > You clipped the xterm and gnome-terminal windows. Are they the same > > size? > > The two windows share 50% of the width of my screen. I used gimp to > select the whole screen, but I may have missed a few pixels on the > margins. Also, the WM (fluxbox) seems to create a 2-3 pixel-wide overlap > for reasons that escape me and this is consistent across applications. > > > Does the gnome-terminal contain more pixels (because it accounts > > for the wider glyphs)? > > xwininfo shows the left window is 2 pixels wider than the right (800 v > 798). If I give each window 799 pixels, I still see the same behaviour. Okay, the windows are the same size in pixels, but look at the number of characters on a line. The xterm window includes more characters, which means that the gnome-terminal window includes more pixels per character (the gnome-terminal window cuts your command off in the middle of the closing parenthesis of the call to format). I don't think emacs has anything to do with it.