From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#68042: 30.0.50; `face-font' returns nil after adding remap relative for fontset Date: Sun, 9 Jun 2024 13:56:26 -0700 Message-ID: References: <83zfxw97my.fsf@gnu.org> <83plyr93in.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16645"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68042-done@debbugs.gnu.org, Hanwen Guo To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 09 22:58:07 2024 Return-path: Envelope-to: geb-bug-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 1sGPc6-00048p-UH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jun 2024 22:58:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGPbn-0005hg-I3; Sun, 09 Jun 2024 16:57:47 -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 1sGPbm-0005h5-3U for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 16:57:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGPbl-0002Tx-Rh for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 16:57:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGPc2-0000lW-Dh for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 16:58:02 -0400 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jun 2024 20:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68042 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo notabug Mail-Followup-To: 68042@debbugs.gnu.org, stefankangas@gmail.com, g.hanwen@outlook.com Original-Received: via spool by 68042-done@debbugs.gnu.org id=D68042.17179666722913 (code D ref 68042); Sun, 09 Jun 2024 20:58:02 +0000 Original-Received: (at 68042-done) by debbugs.gnu.org; 9 Jun 2024 20:57:52 +0000 Original-Received: from localhost ([127.0.0.1]:60255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGPbr-0000ku-J1 for submit@debbugs.gnu.org; Sun, 09 Jun 2024 16:57:51 -0400 Original-Received: from mail-lj1-f172.google.com ([209.85.208.172]:45521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGPbp-0000kX-Bz for 68042-done@debbugs.gnu.org; Sun, 09 Jun 2024 16:57:50 -0400 Original-Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2eaa89464a3so42134761fa.3 for <68042-done@debbugs.gnu.org>; Sun, 09 Jun 2024 13:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717966587; x=1718571387; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=Z2Erm4j25DF3ed4519LthmdNbdTqqcZ3PMMDo0TSq3E=; b=dYVuCAszIBap55pso1sELJYtOEic8SQTriv+bsCvsjlJ3fdgaLn2CZhA8FP+qR6BE+ wcEuWYtrR2xwj49qkwiuUuSemQ79iqbylSd86//CJFkUlfqOb9bbBYRIsB3+FnD5E9Hu 3BUNxeXy58FkE/fSRnn4uDOYMQl1ED+oc00QW5B++xv0I9nuM3DE7iHc9XssiyRtqtzg xvVYYkyftvmqe8lM3b1voS7k3oozM8Fypl0Q3QZWIrp/Sdbc20s6WmqE8+iaYFI3VwIy spzgq3pqDUR00lGCTt0G4jQ78F7VWHfxWCqWSu0AfTz/uQyVa4owxXtqxozaiRJMpLGX 51qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717966587; x=1718571387; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z2Erm4j25DF3ed4519LthmdNbdTqqcZ3PMMDo0TSq3E=; b=eM5pywEI6mjx6Oks0/zifWHjmM06dQmPRr7VR+3MOYsIt/gZNx6/jxUDHiUrI/bNo/ Ki6AGMXGhmJ2m1ndv9EwovcGKx72mPj+U5Fj1Wp9V57LVC60/nSw/o0OlYav3zarldUY 24C7fGmYSenDqVz2qRbnFffUlSote/tsYzY+GwVRxWPQjrjEoJm9gUQjOlwxKC2DXcyt 2Eg4H6upAkoKbqt6aqPgQEsp7lYHkGbwOHZe5IBom33a+jz6D/mJ1+zPNkQGBn7uVtKO ywCqA95TXPvKxEq/L0Q7nEUAXpex8zQR3mDeca6GM5GVLg5yr74D4TX+BVaJS0YtCAkA G3EQ== X-Forwarded-Encrypted: i=1; AJvYcCWppAUfSHXU5EHlIqj5MmLOW3dyajFMhS9h5JHSZPSxuUz86+1kdATWsrw6al8SWO2sK1QkcQx8atIODorK/u2EpsmqZDMNlbFL7g== X-Gm-Message-State: AOJu0YyAbI7CJigVNzji7MzPrkF607BnryLWrVx0BhDad+NfFmPBd4bo h1hmr5PsfhgGEvUAMOLmeHvt7AoMjII5xv/MdoEuCHLYOISsk9shnJS7xctkPvJWGV/MfFaglyV bzAPySyVcvH1Dc0Gq9jyCrdVLXFs+C5L3 X-Google-Smtp-Source: AGHT+IEEgnWKcBIDmg+6OhYJK9NvyD/bnEOeo2DDN8wofadf+Q2vBmjqG/lxgJN9TS9N4yMtX5hccVCqNfSpAW0HslY= X-Received: by 2002:a2e:9d91:0:b0:2eb:d620:88d2 with SMTP id 38308e7fff4ca-2ebd6208a4fmr23337911fa.5.1717966586439; Sun, 09 Jun 2024 13:56:26 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 9 Jun 2024 13:56:26 -0700 In-Reply-To: <83plyr93in.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Dec 2023 15:30:24 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286976 Archived-At: Eli Zaretskii writes: >> From: Hanwen Guo >> CC: "68042@debbugs.gnu.org" <68042@debbugs.gnu.org> >> Date: Wed, 27 Dec 2023 06:43:46 +0000 >> >> > If you replace all instances of :fontset above with :font, face-font >> will not return nil. >> >> Actually, if you pass the fontset through the `:font' attribute, only the ASCII font from the fontset is >> used. > > Yes, because the faces that are exposed to Lisp are always the faces > used for characters supported by the "ASCII font" of a face. For > other characters, Emacs creates internally a separate face, which is > not exposed to Lisp, and determines its font from the fontset in > effect, merging the other relevant face attributes to produce a face > as similar as possible to the one used for characters covered by the > "ASCII font". > >> This applies to both `set-face-attribute' and `face-remap-add-relative'. AFAIU, I think when it >> comes to the face attributes, the fontset feature is more like a way to set different font for diferent >> character sets, making it able to "display the whole range of characters that Emacs supports" for a >> given face, since setting the `:family' attribute or assigning a single font to `:font' would suffice for >> setting font only for ASCII characters. So the case is, either the `:font' attribute needs to consider the >> full fontset, or the whole fontset feature is, as you said, "obsolete". > > Then please explain in more detail what you are trying to achieve, and > why. The code snippet you presented makes it hard to guess, since it > defines a face with a special fontset, and then remaps the 'default' > face to that face. Why would you need to do that, instead of simply > customizing the default-fontset or setting the :fontset attribute of > the 'default' face? > > The technical reason for what you see is that face-remapping creates > an anonymous face with the specified attributes, and Emacs doesn't > support the :fontset attribute for anonymous faces. But since I don't > really understand why you use face-remap-add-relative, I cannot tell > whether this is a problem or how to solve it for your needs. More information was requested, but none was given within 23 weeks, so I'm closing this bug. If this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report.