From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rodrigo Morales Newsgroups: gmane.emacs.help Subject: Re: Error when using Unifont and trying to launch M-x term Date: Thu, 16 May 2024 14:43:00 -0500 Message-ID: <87zfspzgor.fsf@rodrigomorales.site> References: <8684bb0021409771f1532cee9cb0424f@rodrigomorales.site> <86eda2jl21.fsf@gnu.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="5201"; mail-complaints-to="usenet@ciao.gmane.io" To: Eli Zaretskii , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 16 21:44:04 2024 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 1s7h1I-00014A-8r for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 16 May 2024 21:44:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7h0l-0007Yk-WD; Thu, 16 May 2024 15:43:32 -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 1s7h0k-0007YL-EG for help-gnu-emacs@gnu.org; Thu, 16 May 2024 15:43:30 -0400 Original-Received: from smtpout1.mo11.mail-out.ovh.ca ([51.161.45.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7h0W-0000j2-Hc; Thu, 16 May 2024 15:43:30 -0400 Original-Received: from mxplan1.mail.ovh.ca (unknown [10.111.38.231]) by mo11.mail-out.ovh.ca (Postfix) with ESMTPS id 4VgL9X2vNSzHpvj; Thu, 16 May 2024 16:43:12 -0300 (ADT) Original-Received: from rodrigomorales.site (54.39.251.56) by DAG2EX1.mxpca1.local (172.16.2.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 16 May 2024 15:43:11 -0400 Authentication-Results: garm.ovh; auth=pass (GARM-94B0011dc3c72b-385b-4474-acfd-56856c3158cf, 5137DFFF7A76F09C95A31057F3CB7C7DEF536FCB) smtp.auth=me@rodrigomorales.site X-OVh-ClientIp: 190.232.101.8 In-Reply-To: <86eda2jl21.fsf@gnu.org> X-Originating-IP: [54.39.251.56] X-ClientProxiedBy: DAG1EX2.mxpca1.local (172.16.2.2) To DAG2EX1.mxpca1.local (172.16.2.11) X-Ovh-Tracer-GUID: 6f001e6e-b596-40bb-bfc2-63a5507b158e X-Ovh-Tracer-Id: 7048133419634663066 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdehuddgudefjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffujghffffkgggtgfhisehtqhertddttdejnecuhfhrohhmpeftohgurhhighhoucfoohhrrghlvghsuceomhgvsehrohgurhhighhomhhorhgrlhgvshdrshhithgvqeenucggtffrrghtthgvrhhnpeeiledvkeejveefgeeuuedvfffgfedvhfevjeevveefhfegjeejkeeuteehfedukeenucffohhmrghinhepghhnuhdrohhrghenucfkphepuddvjedrtddrtddruddpheegrdefledrvdehuddrheeipdduledtrddvfedvrddutddurdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehmvgesrhhoughrihhgohhmohhrrghlvghsrdhsihhtvgdpnhgspghrtghpthhtohepvddprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehhvghlphdqghhnuhdqvghmrggtshesghhn uhdrohhrghdpoffvtefjohhsthepmhhouddupdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=51.161.45.253; envelope-from=me@rodrigomorales.site; helo=smtpout1.mo11.mail-out.ovh.ca 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.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:146775 Archived-At: Eli Zaretskii writes: > Maybe because you are setting up your fonts and fontsets incorrectly? > For example, you cannot affect the default font, the one used for the > ASCII characters, via set-fontset-font, at least not in the na=C3=AFve way > you are doing that. Instead, you should do it the "traditional" way, > by adding this: > > (add-to-list 'default-frame-alist '(font . "Unifont")) > > to your init file, and then tell Emacs (again in the init file) that > Unifont should be used for the entire Unicode space of non-ASCII > characters: > > (set-fontset-font t 'unicode "Unifont" nil 'prepend) > > In addition, you may need to customize face-font-family-alternatives, > and specifically the alternatives for "Sans Serif" (not sure about > this, but that's where the "-Sans-Serif" suffix above might be coming > from), if the above two measures are still not enough. > > Please try the above, and if it also produces an error, report a bug > using "M-x report-emacs-bug RET", with all the details. Thanks. I wasn't aware of those methods for setting the default font. The same error is still being thrown. I have reported a bug: https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-05/msg00953.html > P.S. Let me just note, and I will only do this once, that doing all of > that just to have all the lines in "M-x term" be the same height in > 110% of cases is IMNSHO too much effort for a little gain. Your time > and energy will be spent much better by looking at fonts for > characters that make the line height higher, then finding alternative > fonts for those characters which don't have that effect, and > configuring your fontset to use those better fonts for those > problematic characters. As a nice bonus, this will leave you with > much nicer fonts than Unifont can ever be. Thanks for the suggestion. I am afraid I didn't make my use case clear: I value more efficiency over aesthetics so I don't care whether a bitmap font looks ugly or not. I work with different scripts from different languages in Emacs, some of these scripts contain characters with minimal details. For example, consider the following pairs of characters: =E7=92=A7=E5=A3=81, =E9=95=B1=E9=95=9C and =E7=95=B2=E7=95=AC. = In order to easily different those characters, I display them with a big size using a OpenType font. A big font size for ASCII characters is not required, because ASCII characters can be easily differentiated, so I use an extremely small bitmap font for ASCII characters, a benefit of doing this is that the most number of lines fit on my screen and I can read the most information without scrolling. A combination of big OpenType fonts and extremely small bitmap fonts doesn't mix well inside *terminal* because it seems that *terminal* assumes that all lines have the same height, so some information in the *terminal* window is displayed out of the limits of the window. Now, most of my work inside *terminal* involves displaying ASCII characters so I want to make *terminal* use the extremely small bitmap font, non-ASCII characters are hardly shown but if they are shown I want the entire content of *terminal* still fit the window. Here's another use case: when I am learning new things or I feel tired, I change the extremely small bitmap font in *terminal* to an OpenType font, whether a bitmap font or a OpenType font I want the entire contents of *terminal* to fit the window. So, the question I really want to solve is: Given one and only one arbitrary font with an arbitrary size, how can I always ensure that the information displayed in *terminal* fits the window in its entirety? Some terminal emulators such as gnome-terminal and kitty are able to fit the entire content regardless of the characters that are being shown (I haven't done exhaustive testing on this, but I tried some scenarios). I think they are able to do that by assigning the same height to all lines and trying to fit all characters for that height.