From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Emacs 28: bitmap fonts, vector font character spacing Date: Mon, 24 Jul 2023 22:41:02 +0800 Message-ID: References: <874jltbgcz.fsf@drac> <6bf5fffa-6f73-6926-4fea-37f3913c7028@magnaspesmeretrix.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="33938"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: PierGianLuca Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 24 16:41:58 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 1qNwl4-0008bo-4y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 Jul 2023 16:41:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNwkY-0005mM-MM; Mon, 24 Jul 2023 10:41:27 -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 1qNwkO-0005lS-Ur for help-gnu-emacs@gnu.org; Mon, 24 Jul 2023 10:41:17 -0400 Original-Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNwkM-0000dR-TO for help-gnu-emacs@gnu.org; Mon, 24 Jul 2023 10:41:16 -0400 Original-Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5838881e30bso48374567b3.2 for ; Mon, 24 Jul 2023 07:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690209674; x=1690814474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xcbT2JRvzp6XbioyHm0mIBji0unYXxcsXQ3eI8wn3Nw=; b=Pqf7Zdw2MSkCdruC/YBFfUqcWxQY2TpiI83a2fDYUCT6qYcd34wNJ6U+1FVcjGUm30 enUI78qlS+ef9gOAwJNxCD9arXsWV75pSZ7xnQXVJ0je2/U8rmDfEI5zycXWhTn4jH/J m1rBGkskLuWgdLsGpsQDDiv2haLmsc9BImv69vjcktSG/2Z3OMZa1xZgvxWQqQNE8n4t yVUBPd8zliuSeVQWmwfGxSMOolJ9CQBhmOSdlWSfcPsG67SWqT1wekkLWr3zi7quwe8e tRDbwwP6tUbpwzbU++xAGAd8GapZkpPe+xf9FGJmy5ZrCqZXUhvr+vjcT+f8T2F+Q13x Qsdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690209674; x=1690814474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xcbT2JRvzp6XbioyHm0mIBji0unYXxcsXQ3eI8wn3Nw=; b=SRPhjZN+LAIcBe3V+AR/PkQkiPq1mBdnAIJ4CMobl4wIGzcerOchPLke4COM5D54VC oLpAjfwvOnchfcpwnsUicMUu1c0QHJ+USgsRuaiqKWzgJo7RwMk974mj1WyhIatqZ3Gz 4TXflO6ObK/8zQnDOGI3kUafBi25hSxz6fOSZ1AgZYUjZ5A252qVYcrTI961acoQYRnQ swo5A7BCKpP1GOi5jQLxqyP6HS93XZtaV3T7jBPd9iqg1lxj0Qgew5SdZi8xkYDYZyaE 2sS1lh5WT2Ja39IMYS7NTmw2g15Yy696zBUXWM22c/srZifXBx+ndbMZrLtDjPA1jdm4 90Fg== X-Gm-Message-State: ABy/qLYoD8X/dDztpgvC2uf1GtO4v77I7rYQZ+m2e2zMAgEv1PdCdRPl fljhQLQCzw/k2mooKsBDgTd4x3m5zCelrz2nWr5OnvLYPAdtpUqG X-Google-Smtp-Source: APBJJlHabdNlsRK3MHAc+2vrGuwZRZbf6a6n8nbvZpXtc7EOBd5bQWOj7xLenjiZCE4nPQgHwxelsi0No34pKwET9XQ= X-Received: by 2002:a81:710a:0:b0:583:a354:f259 with SMTP id m10-20020a81710a000000b00583a354f259mr7201009ywc.3.1690209673651; Mon, 24 Jul 2023 07:41:13 -0700 (PDT) In-Reply-To: <6bf5fffa-6f73-6926-4fea-37f3913c7028@magnaspesmeretrix.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1132; envelope-from=hongyi.zhao@gmail.com; helo=mail-yw1-x1132.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, 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:144416 Archived-At: On Mon, Jul 24, 2023 at 9:57=E2=80=AFPM PierGianLuca wrote: > > 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/ An alternative is the following one: https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/DejaVuSan= sMono See the related fonts installed on my OS: werner@X10DAi:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy werner@X10DAi:~$ fc-list -b |grep -i 'family:.*dejavu' family: "DejaVu Sans"(s) family: "DejaVu Sans Mono"(s) family: "DejaVuSansMono Nerd Font Mono"(s) family: "DejaVu Sans"(s) "DejaVu Sans Condensed"(s) family: "DejaVu Serif Condensed"(s) family: "DejaVuSansMono NF"(s) family: "DejaVuSansMono Nerd Font"(s) family: "DejaVu Sans"(s) "DejaVu Sans Condensed"(s) family: "DejaVu Serif"(s) family: "DejaVu Serif"(s) family: "DejaVu Sans"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Sans"(s) family: "DejaVuSansMono NF"(s) family: "DejaVu Sans"(s) family: "DejaVuSansMono Nerd Font"(s) family: "DejaVuSansMono Nerd Font Mono"(s) family: "DejaVuSansMono NF"(s) family: "DejaVu Serif Condensed"(s) family: "DejaVuSansMono Nerd Font Mono"(s) family: "DejaVu Sans Condensed"(s) family: "DejaVu Serif Condensed"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Sans"(s) "DejaVu Sans Condensed"(s) family: "DejaVu Serif"(s) family: "DejaVu Sans Condensed"(s) family: "DejaVu Serif"(s) "DejaVu Serif Condensed"(s) family: "DejaVu Sans"(s) family: "DejaVu Sans"(s) family: "DejaVu Serif"(s) family: "DejaVu Serif"(s) family: "DejaVu Sans"(s) family: "DejaVu Serif"(s) "DejaVu Serif Condensed"(s) family: "DejaVuSansMono NF"(s) family: "DejaVu Serif"(s) family: "DejaVu Sans"(s) "DejaVu Sans Condensed"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Sans"(s) family: "DejaVu Serif Condensed"(s) family: "DejaVu Sans Condensed"(s) family: "DejaVu Math TeX Gyre"(s) family: "DejaVu Sans"(s) family: "TeX Gyre DejaVu Math"(s) family: "DejaVu Sans"(s) family: "DejaVu Serif"(s) "DejaVu Serif Condensed"(s) family: "DejaVu Sans Light"(s) family: "DejaVu Sans Condensed"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Serif"(s) family: "DejaVu Serif"(s) family: "DejaVuSansMono Nerd Font Mono"(s) family: "DejaVu Sans"(s) "DejaVu Sans Light"(s) family: "DejaVu Serif"(s) family: "DejaVuSansMono Nerd Font"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Serif"(s) "DejaVu Serif Condensed"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Sans Mono"(s) family: "DejaVu Serif"(s) family: "DejaVuSansMono Nerd Font"(s) And below is my init.el settings: (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:family "DejaVuSansMono Nerd Font Mono" :foundry "PfEd" :slant normal :weight normal :height 160 :width normal))))) > Cheers, > Luca Best, Zhao > > On 230724 15:15, Christoph Groth wrote: > > Hello, > > > > I=E2=80=99m 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 =E2=80=9CTerminus=E2=80=9D bitma= p font in Emacs > > and terminal windows on =E2=80=9Cregular density=E2=80=9D displays. On= =E2=80=9CHiDPI=E2=80=9D displays > > I switched to vector fonts, but for low density displays I preferred th= e > > 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=E2=80=99m not= even > > sure whether it=E2=80=99s still Terminus). It is possible to choose Te= rminus > > 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 =E2=80=9Csome problems=E2= =80=9D mean that > > fonts like Terminus no longer work and that I have to recompile Emacs i= f > > 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=E2=80=99d go with the time and switch to a vector f= ont 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 =E2= =80=9CFira > > Code-N=E2=80=9D. 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 informatio= n > > 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 JPE= G JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_C= OMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCRO= LL_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