From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: PierGianLuca Newsgroups: gmane.emacs.help Subject: Re: Emacs 28: bitmap fonts, vector font character spacing Date: Mon, 24 Jul 2023 15:56:44 +0200 Message-ID: <6bf5fffa-6f73-6926-4fea-37f3913c7028@magnaspesmeretrix.org> References: <874jltbgcz.fsf@drac> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2075"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 24 15:57:29 2023 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 1qNw40-0000JE-UG for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 Jul 2023 15:57:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNw3Z-0008Ib-MX; Mon, 24 Jul 2023 09:57:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNw3U-0008IJ-IO for help-gnu-emacs@gnu.org; Mon, 24 Jul 2023 09:56:59 -0400 Original-Received: from manu28.manufrog.com ([138.128.182.226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNw3S-00062w-9F for help-gnu-emacs@gnu.org; Mon, 24 Jul 2023 09:56:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=magnaspesmeretrix.org; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=t9+K8fD2khY7hQC3o3SyxfPIUY2pzNqDQmX1HwsIqUg=; b=QVkMaDR+Id1pdeN9orgKAy3hT2 adhVTJQhh0kDyCXfO+0HVntUo64Uo92Su+s7o+VdVK9UVFxr9XTly5mqjDfUq9dT6Si5H4dsMQ109 x0xFkvMVxP9jsPEKCwkz1UENQ; Original-Received: from [88.94.110.2] (port=48794 helo=[10.0.0.18]) by manu28.manufrog.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qNw3O-0003Oe-19 for help-gnu-emacs@gnu.org; Mon, 24 Jul 2023 15:56:49 +0200 Content-Language: en-GB In-Reply-To: <874jltbgcz.fsf@drac> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - manu28.manufrog.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - magnaspesmeretrix.org X-Get-Message-Sender-Via: manu28.manufrog.com: authenticated_id: luca@magnaspesmeretrix.org X-Authenticated-Sender: manu28.manufrog.com: luca@magnaspesmeretrix.org Received-SPF: pass client-ip=138.128.182.226; envelope-from=luca@magnaspesmeretrix.org; helo=manu28.manufrog.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-0.091, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144415 Archived-At: I've happily used the DejaVu Sans Mono for many years, with (set-face-attribute 'default nil :font "DejaVu Sans Mono") (set-face-attribute 'default nil :height 94) on my hi-dpi laptop and on non-hidpi laptops. It works seamlessly. Maybe Terminus is not monospaced though. I suppose the other proportional DejaVu fonts would work as well https://dejavu-fonts.github.io/ Cheers, Luca On 230724 15:15, Christoph Groth wrote: > Hello, > > I’m having some trouble trying to set up a pleasant font after upgrading > to Emacs 28. Would someone be so kind to help? > > For many years I was happily using the “Terminus” bitmap font in Emacs > and terminal windows on “regular density” displays. On “HiDPI” displays > I switched to vector fonts, but for low density displays I preferred the > crisp Terminus. > > I recently upgraded Emacs from 27.1 to 28.2 as part of upgrading to the > new Debian stable and this broke my font setup. I have something like > the following in my emacs config. > > (add-to-list 'default-frame-alist '(font . "Terminus-12")) > > With Emacs 28.2 the default font is now much too small (I’m not even > sure whether it’s still Terminus). It is possible to choose Terminus > with M-x menu-set-font, but this shows the same tiny font independently > of the chosen size. > > I noticed the following entry in NEWS: > >> ** The Cairo graphics library is now used by default if present. >> '--with-cairo' is now the default, if the appropriate development >> files are found by 'configure'. Building with Cairo is known to cause >> some problems with bitmap fonts. This may require you to adjust your >> font settings, or to build with Xft support instead. > > Unfortunately, this is not very specific. Do “some problems” mean that > fonts like Terminus no longer work and that I have to recompile Emacs if > I want to use them, or is there some workaround? I tried to find one, > but so far without success. > > ---------------------------------------------------------------- > > So, OK, I thought I’d go with the time and switch to a vector font on > low-density displays as well. I like how Fira Code Light looks in > xfce4-terminal. > > I managed to set it to the size I like through > > (add-to-list > 'default-frame-alist > '(font . "-CTDB-Fira Code-light-normal-normal-*-14-*-*-*-m-0-iso10646-1")) > > (Interestingly, I am not able to obtain this size by simply using “Fira > Code-N”. The font is either too small or too large!) > > Anyway, while with the above the vertical line spacing matches the one in > xfce4-terminal, the horizontal inter-character distance is somewhat > wider. Is there a way to render the font like in xfce4-terminal? > > (I believe that this issue could be related to kerning being handled > differently by Emacs/Cairo, but I did not manage to find any information > on how to adjust it.) > > For reference: > > ---------------------------------------------------------------- > (frame-parameter nil 'font-backend) > (ftcrhb x) > system-configuration-features > "ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB" > ---------------------------------------------------------------- > > My ~/.Xresources contains > > ---------------------------------------------------------------- > Xft.antialias: 0 > Xft.hinting: 0 > Xft.hintstyle: hintfull > Xft.lcdfilter: lcddefault > Xft.rgba: rgb > ---------------------------------------------------------------- > > Cheers > Christoph