From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: displaying missing glyphs Date: Tue, 13 Apr 2021 01:32:34 +0700 Message-ID: References: <86mtu72zc6.fsf@x201.butler.org> <87pmz2ux0k.fsf@eder.anydns.info> <86y2dn1ldz.fsf@x201.butler.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20094"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs , Andreas Eder To: Leo Butler Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 12 20:37:16 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 1lW1Qy-00057X-SL for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Apr 2021 20:37:16 +0200 Original-Received: from localhost ([::1]:37876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW1Qx-0005bC-S0 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Apr 2021 14:37:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW1Mi-0004Xy-O3 for help-gnu-emacs@gnu.org; Mon, 12 Apr 2021 14:32:52 -0400 Original-Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]:42918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lW1Mg-0000hR-6d for help-gnu-emacs@gnu.org; Mon, 12 Apr 2021 14:32:52 -0400 Original-Received: by mail-vk1-xa2e.google.com with SMTP id f11so3070623vkl.9 for ; Mon, 12 Apr 2021 11:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=FRuu9DBrAmWUlWLKnBRw5N/LyLa2PZ89TRuxVi8QrYI=; b=c9m1BXUXDeT0CeidKWAm3FGVmfsMwR0/KFknuDrT97KjN4G0YtgWyfCD3QY0gLWcrA uvGXSGsXr8JUFul1LivpbkEJBNrU4J5yCWWnAL4qSk/bswzXbVMqRGsX8DJloS9lYE3n oKTkEonz+EP1/AFhKQHl+exuuRo1xANwdnfC743SkX+nZFf8+PfPgaUXy1qO8lio3l8q nbrdhpgeC5Yf9qK3iSj4tDLIAFrtZ7qVSIJpITsmsH5Tnz22cvli70x2Ti7qy8N2tKvl W+Eh1n7oGhha9iQt576i4v5IPmuwLpyDJBNQddO+6bcN9nDD/dqbVagnPhX4HZszZ5hF f7Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FRuu9DBrAmWUlWLKnBRw5N/LyLa2PZ89TRuxVi8QrYI=; b=Nce2Hy2U1VLTKYTfYxQYvgtJN+2jtcDn2O+J7ZagqIpZ5RmFQ4d/fd+GL+Q9o9NacI Dh3RMlZ2ekzVKXgkOv9bTpQUdZRMOBCY8rzPZQLLfuskdagUEh/8Biv6+UlG1ev9uOmp gTjUGC1wl0r7vcDF6ltjWF9uyFBxuc39WJmjZzx9hzZOzpmTMfLibrZT1E7Jf1G3gU3e WXzLtPHOc72ZcUqiFoVMo7ToPZUpz+aNtQc4nUD9FZjOF+Y/pvqVSlcUcYd/vrdydWWe Vuy6nbJCkSTlHI5/wtsfj88jSl4tT2uCVJgjog+3zPR5QY1M0kpBasDBsk5E+q6oNKE/ 5uGw== X-Gm-Message-State: AOAM531SVChY7StVIDFWAOJvK37NKjtfe7z7nnnnagWEN/sPyxL6ycRr DR0Zw/hQ4VDRlwArTVMsFRzOqrK0cGxl1OCZXD0= X-Google-Smtp-Source: ABdhPJzAB3M+BPJJHuQ+dmWq2su+ykX4B4k68/4jr+s+JT7QW4li0fgCVEdVhQpeKC0miClJbiy+meZauC41zEQFpcY= X-Received: by 2002:a1f:9695:: with SMTP id y143mr20641375vkd.7.1618252367154; Mon, 12 Apr 2021 11:32:47 -0700 (PDT) In-Reply-To: <86y2dn1ldz.fsf@x201.butler.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::a2e; envelope-from=yurivkhan@gmail.com; helo=mail-vk1-xa2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:128972 Archived-At: On Tue, 13 Apr 2021 at 00:24, Leo Butler wrote: > 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 The DejaVu Sans Mono font does not even contain glyphs for MATHEMATICAL BOLD CAPITAL [A-Z] (on my Ubuntu 20.04, checked via gucharmap(1)). The glyphs are taken from some other font that does have them, possibly FreeSerif (which is not a monospace font, and even if it were, it would not have the same metrics as DejaVu Sans Mono). The difference in rendering stems from the way the two terminals paint each cell. You will observe it more evidently if you enclose each glyph in some delimiters, e.g. (insert (format "\n%s\n%x\t[%c]" x y y)). Xterm seems to paint the next cell (space) opaquely, partially erasing the MATHEMATICAL BOLD CAPITAL A. GNOME Terminal paints it transparently so the rightmost part of the letter is still visible under the closing bracket. Another terminal emulator, Kitty, dynamically reduces the font size for the MATHEMATICAL BOLD CAPITAL A so its width does not exceed the cell width. Emacs running as a text-only application in a terminal emulator does not, cannot, and should not know the font(s) it=E2=80=99s being rendered wi= th or any terminal-emulator-specific rendering peculiarities, or do anything to improve the way it=E2=80=99s rendered. Font fallback is hard, especially when you want character cells to align perfectly (which, in case of a terminal emulator, you always do). You might try filing a bug against Xterm.