From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: How to enforce unicode font for all charsets? Date: Wed, 11 Mar 2020 09:17:12 +0100 Message-ID: References: <874kuwphsz.fsf@osv.gnss.ru> <83wo7s9sgt.fsf@gnu.org> <87a74niii8.fsf@osv.gnss.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="96768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Sergey Organov Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 11 09:17:39 2020 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 1jBwYd-000P3U-6F for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 11 Mar 2020 09:17:39 +0100 Original-Received: from localhost ([::1]:47946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBwYc-0003KQ-4k for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 11 Mar 2020 04:17:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59729) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBwYK-0003KK-58 for help-gnu-emacs@gnu.org; Wed, 11 Mar 2020 04:17:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBwYJ-0001hr-0a for help-gnu-emacs@gnu.org; Wed, 11 Mar 2020 04:17:19 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:54890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBwYI-0001fp-QK for help-gnu-emacs@gnu.org; Wed, 11 Mar 2020 04:17:18 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id n8so1009836wmc.4 for ; Wed, 11 Mar 2020 01:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version; bh=eftXemmWLi6gXJOxaKqYo199K/XGDILaGjeIOrMs+EA=; b=X6KhDSzKFJFpQE7hm7ex4doWkjkLYLLsY6vIlUPZpAGY/xbIPnMMadOk2reB3XuJ1s zR0HxSYrYcFTLGnZqDj3G0q3qFEWX4qeUhvOu2f9Dyfopy5aoD0cM/AOKTxDaQUGVgd7 p4MqNhbZ5BVZUtTr/tcCzHtBm0DRrg1OirV8QSzQU/hJFKJhXHFw7MYi900gat9EYIFk zzPuJjwVzBHXf1fnZRqznjWNQLNvPlRmUpvzIDnAE6kDEw63e8ZvwyU2vfpLQpE8kO8I d9LxMGM3laxDOqEaoHF5aH0t/aElAwQOLg9q+zcIyf8gaMvnTn/e6y1v607/18QQHs1x E3Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=eftXemmWLi6gXJOxaKqYo199K/XGDILaGjeIOrMs+EA=; b=aO9rpxLdcn5V3hcazDNtF3iELodBNFpTsbNjSgKQ+gOw3u4k1OgiKB7MDTiIMHjE3F pbTOVtYSe0h41VH5A/quPctT64Bia0UUu2fApjNfqSBajFReD61omlKp6tsz+3Gaj6y7 q/w3YeAq1o3qHqUYjQH8xE/WjluxxY4uEMMmgHS/cbNQ1OLkxNIOCGP9M0/ALNCbbPb8 fBP6CnS0ub/4/caUhvxOBICMM8vZPYf1Ciyf4q/TpT/OP44kofu9jFPhjoYDvyLJY2m7 ss01fpQJYn3UXKDgL6H3Ha2l9hC2ugm6gL4MDsMhhITlU9ghc5iYjdCyjSorteSOxRcj EiMA== X-Gm-Message-State: ANhLgQ0+qGIa9ZuBEPDcG43GH6LBS4AKN98SYTSazIzYVAz5j3VuQjxY L6McaegN4epadSiH0PbA5d1Ke+gW X-Google-Smtp-Source: ADFU+vt/PpWlZ2ht4nuAtKYSm9IO3xv17b0eiKlJgTCheQz/SVtLLoMq1Don1312m5qosRsCMNn3qw== X-Received: by 2002:a1c:9c96:: with SMTP id f144mr2420738wme.98.1583914635732; Wed, 11 Mar 2020 01:17:15 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id x5sm7426346wrv.67.2020.03.11.01.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 01:17:15 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87a74niii8.fsf@osv.gnss.ru> (Sergey Organov's message of "Wed, 11 Mar 2020 08:10:39 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c 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:122562 Archived-At: >>>>> On Wed, 11 Mar 2020 08:10:39 +0300, Sergey Organov said: Sergey> Thanks, I was thinking along these lines indeed. The problem is I can't Sergey> figure how exactly do I do it, provided the DejaVu Sans Mono is the font Sergey> currently being set through M-x customize-face RET default, and I don't Sergey> want to loose the ability to change this way the (only) font I'd like to Sergey> use. Sergey> I mean, it looks like I need to modify fontset-auto1, as M-x Sergey> describe-fontset RET shows: Sergey> Fontset: -PfEd-DejaVu Sans Mono-normal-normal-normal-*-23-*-*-*-m-0-fontset-auto1 Sergey> [...] Sergey> and after some more digging, I finally tried: Sergey> (set-fontset-font "fontset-auto1" 'windows-1251 Sergey> (font-xlfd-name (face-attribute 'default :font)) Sergey> which evaluates to: Sergey> "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-23-*-*-*-m-0-iso10646-1" You'd want to use nil instead of "fontset-auto1" to affect the current frame's fontset, or t to affect the default fontset. Sergey> but doesn't seem to have any visible effect. And even if that worked, it Sergey> wouldn't immediately pick subsequent customization of the default face Sergey> anyway? Right, fontsets are static. How often do you customize your default face? :-) Sergey> What do I miss? >> Moreover, specifying that font for any charset is probably not >> a good idea, since no font covers all of Unicode. Sergey> Maybe I should be able to express exactly this by specifying, say, Sergey> "preferred font" for a fontset? I mean: "use this font, unless there is Sergey> no suitable glyph, in which case turn back to the fancy methods of Sergey> considering charsets". By default, set-fontset-font replaces the existing definition. You can pass it 'prepend' as the fifth argument to have it add to the front of the existing one. Sergey> Actually, I probably do want to use only this font (and have empty Sergey> rectangles or some such in case of missed glyphs). I mean some way to Sergey> force Emacs to behave as if this font is the only available font in the Sergey> entire system. Still no simple way? For all characters or just the windows-1251 charset? If the latter (set-fontset-font t 'windows-1251 (font-xlfd-name (face-attribute 'default :font)) should do that. Robert