[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: displaying missing glyphs
From: |
Leo Butler |
Subject: |
Re: displaying missing glyphs |
Date: |
Mon, 12 Apr 2021 13:45:20 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
<2QdxY4RzWzUUiLuE@potatochowder.com> writes:
>
> On 2021-04-12 at 12:08:08 -0500,
> Regarding "Re: displaying missing glyphs,"
> Leo Butler <leo.butler@umanitoba.ca> wrote:
>
>> Andreas Eder <a_eder_muc@web.de> writes:
>>
>> > On Fr 09 Apr 2021 at 11:32, Leo Butler <leo.butler@umanitoba.ca> 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.
Leo