From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#49797: 28.0.50; Setting face to custom fontset doesn't work Date: Thu, 7 Oct 2021 13:13:28 -0700 Message-ID: <8B79C354-D63D-42F4-9910-72B3568315CD@gmail.com> References: <87y29k2h4z.fsf@gnu.org> <3B853424-9F63-4A6B-B7A9-2E3AB71986AC@gmail.com> <835yub4fj5.fsf@gnu.org> <8FD18262-3F40-4033-A49D-F6CEA89A3A31@gmail.com> <83sfxf2ry5.fsf@gnu.org> <1AF30098-F55E-48A7-A0D4-E529DFBA6895@gmail.com> <838rz62kx8.fsf@gnu.org> <890ABB11-65A7-4F52-8816-7FA90BED7961@gmail.com> <83zgrm0zqt.fsf@gnu.org> <219B3DA8-2E40-4BC1-8235-7330308F1737@gmail.com> <83y2760yec.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) 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="10351"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Kenichi Handa , 49797@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 07 22:22:29 2021 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 1mYZuO-0002TT-QD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 22:22:28 +0200 Original-Received: from localhost ([::1]:37920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYZuN-000740-P2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 16:22:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYZmE-0001Yk-TH for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 16:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYZmE-0008Sg-HF for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 16:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYZmE-0004Rz-CJ for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 16:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2021 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49797 X-GNU-PR-Package: emacs Original-Received: via spool by 49797-submit@debbugs.gnu.org id=B49797.163363761817055 (code B ref 49797); Thu, 07 Oct 2021 20:14:02 +0000 Original-Received: (at 49797) by debbugs.gnu.org; 7 Oct 2021 20:13:38 +0000 Original-Received: from localhost ([127.0.0.1]:48478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYZlq-0004R0-7d for submit@debbugs.gnu.org; Thu, 07 Oct 2021 16:13:38 -0400 Original-Received: from mail-pl1-f174.google.com ([209.85.214.174]:46834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYZlo-0004Qm-IR for 49797@debbugs.gnu.org; Thu, 07 Oct 2021 16:13:37 -0400 Original-Received: by mail-pl1-f174.google.com with SMTP id w11so4606810plz.13 for <49797@debbugs.gnu.org>; Thu, 07 Oct 2021 13:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3mtE5ICouc6++JS0otUF1OZ+Xi2nZYxdYfDdouQumqc=; b=iO41m9xK+44svWqQScy9u//FNNezu9p77bsB3tv5VLduTjudV7fuyXDoEQ5w8BhU98 Krq0Lk8UV3gaZp7LFohqQdR9+Y3j6RbNcaE9ZO8/ZZ0YyjGlhqeZC9xXXZMI4Iz3Fp6G cO0xuCso4yDBIrjREeDW85vrYsYPacFf/zBdzHSblibw8IoJytYn4AiYHqqyKzJtuuIZ w70UAHJhQIiBhl/zCBDiUkrHkbdf7FBW8GQgnX79AYeHbA6EAbBqoR9wG+ow4Gf10+VB ievNNkX569lgZ3P/vWnJ/xgfdPDTSEJZOrnI6MHGrDBVUteUkgV/l2JO9+0HgocSSx32 BABg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3mtE5ICouc6++JS0otUF1OZ+Xi2nZYxdYfDdouQumqc=; b=eFBzCEQIUp1WvylyzfYZsAJZKsGCp4LHXRH4hnWNQRddxHjKwd+ac/coH0JuEUU7GC YZglEXRXAogpnCH+KReoEFXMeOl5eAe1PN7ua8zAtd9H+KdB+5dTiOwS/Sx7HGAGKWl4 yMo34wmXcD8uk9pVpt0h3D6rut5nYZXKKbPNW/4AFPEyOtxw4Oz6qX8QHTCEJH7qF0Vt /1qE1mjyvTz0plq5/4J5auKnAzVwTUvqNF0/dap/kcTpfygF87Zq43tIHKqd98LudosT Z7KNcl3B9HCOdMEv0sxdLCMOkNbx7RhvnALC/VTHpIvuVrUvvV+D+os0/2k/RneAuSFX LfhQ== X-Gm-Message-State: AOAM532Tr9Tkp2m1WhaCyttsj5+TwmKaxN6hpF9F6SsOVF9fyVg7z1w1 EhK4vU4WNWQPxb8SOARgJbXFR500nqw= X-Google-Smtp-Source: ABdhPJxsGJ6E8nORWOPGk8J+9p1cIE+lWYZm8m4hVLMXo7XLIjvUoY5ZrnyhAW14YcirQLqNfDbLGQ== X-Received: by 2002:a17:90b:4d0b:: with SMTP id mw11mr7126121pjb.228.1633637610452; Thu, 07 Oct 2021 13:13:30 -0700 (PDT) Original-Received: from smtpclient.apple ([128.54.41.164]) by smtp.gmail.com with ESMTPSA id x13sm173210pge.37.2021.10.07.13.13.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Oct 2021 13:13:30 -0700 (PDT) In-Reply-To: <83y2760yec.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) 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" Xref: news.gmane.io gmane.emacs.bugs:216682 Archived-At: > On Oct 6, 2021, at 12:02 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Wed, 6 Oct 2021 11:56:18 -0700 >> Cc: Kenichi Handa , >> 49797@debbugs.gnu.org >>=20 >>>> fontset =3D FONTSET_FROM_ID (face->fontset); >>>>=20 >>>> Then find an appropriate font from it >>>>=20 >>>> rfont_def =3D fontset_font (fontset, c, face, id); >>>=20 >>> Yes, AFAIU that's the part where we check if the current face's >>> fontset's font, made for the ASCII characters, happens to have a = glyph >>> for the non-ASCII character we need to display. >>=20 >> That is not, the part you mentioned is before: >>=20 >> if (face->ascii_face->font) >> { >> XSETFONT (font_object, face->ascii_face->font); >> if (font_has_char (f, font_object, c)) >> return face->ascii_face->id; >> } >=20 > No, this is where we try to use the ASCII font for symbols and > punctuation characters. You are right. >=20 >> And what about the comment I mentioned? Did you read it? >=20 > Yes, but it has no relevance to the issue at hand. That whole part is > about displaying symbol and punctuation characters. It IMO reveals the writer=E2=80=99s intent that fontset can be used to = force a face to display certain characters with certain font. I won=E2=80=99= t insist on proving this, tho. >=20 >> In any case,=20 >>=20 >> rfont_def =3D fontset_font (fontset, c, face, id);=20 >>=20 >> finds a font in the fontset that can display character c. That=E2=80=99= s hard to ignore. >=20 > I didn't. Ok. >=20 >>> As mentioned earlier, user code is not supposed to set the :fontset >>> attribute directly, which is why it isn't documented. >>=20 >> Finternal_set_lisp_face_attribute has code that let me set :fontset. = Why is it there if Lisp is not supposed to set :fontset? >=20 > How is that relevant? That something is possible doesn't mean it's > recommended. Ok. >=20 >> Plus, Emacs doesn=E2=80=99t set :fontset by itself >=20 > It does, via the Lisp attributes and LFACE_FONTSET_INDEX. That's what > matters on the C level. Ok. Still, I believe fontset is supposed to be used as I described. Let=E2=80=99= s wait for Handa-san. Thanks, Yuan