all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuchen Guo <yguo@posteo.net>
Cc: 66416@debbugs.gnu.org
Subject: bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
Date: Wed, 11 Oct 2023 14:31:20 +0300	[thread overview]
Message-ID: <838r89v1iv.fsf@gnu.org> (raw)
In-Reply-To: <86y1gajve8.fsf@lan> (message from Yuchen Guo on Tue, 10 Oct 2023 16:26:55 +0000)

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Tue, 10 Oct 2023 16:26:55 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Do the fonts that you want to use have such language tags?  If they
> > do, which language tags correspond to what language-environments in
> > Emacs?
> 
> How can I check this?  I tried `describe-font' on the font I wish to
> use, the output is the following

Try font-info instead, and look at the last, 13th, element of the
vector it returns.  The doc string of font-info describes what it can
tell you.

> > So if certain language tags should be required from Chinese fonts in
> > specific Chinese language-environments, we can express that in our
> > default fontset, so that the need for configuring fonts manually is
> > avoided in more cases.
> >
> > ...
> > See above: is it really impossible?
> 
> I'm now convinced that this is indeed possible.  Thanks for the
> detailed explanation, and apologies for not reading `(emacs)Language Environments'
> earlier.  But now I'm unsure whether this is a problem on the part of
> the font, or something that could be fixed in Emacs.

See above.

If the fonts you want to use indeed have the appropriate
language-system tags, then you can request those tags to be present
via set-fontest-font, by using the font-spec function to specify the
FONT-SPEC argument.  See the doc string of font-spec for how to
specify language-system tags.

> The selection of Free-as-in-Freedom CJK fonts is already too
> few, good ones even less, we could ill afford to lose more of them due
> to trivial configuration problems.

The beauty of using font-spec is that you don't have to name the fonts
or their family names, only specify their properties and features, and
Emacs will find the right font(s) automatically (or at least it
should).

> In the meantime, I'm using the following snippet for fallback.  I've
> removed all other configuration:
> 	
> 	(defun my-configure-font (frame)
> 	  "Configure font given initial non-daemon FRAME.
> 	Intended for `after-make-frame-functions'."
> 	  ;; 简体中文与标点。
> 	  (set-fontset-font t 'han (font-spec :family "Noto Serif CJK SC" :weight 'medium))
> 	  (set-fontset-font t 'cjk-misc (font-spec :family "Noto Serif CJK SC" :weight 'medium))
> 	  (remove-hook 'after-make-frame-functions #'my-configure-font))
> 	
> 	(add-hook 'after-make-frame-functions #'my-configure-font)
> 
> Does this make any sense?

Yes, I think so.





  reply	other threads:[~2023-10-11 11:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-09 11:19   ` Eli Zaretskii
2023-10-09 11:24 ` Eli Zaretskii
     [not found]   ` <87bkd7k6b8.fsf@lan>
2023-10-09 18:45     ` Eli Zaretskii
2023-10-09 19:07       ` Yuchen Guo
2023-10-10  2:30         ` Eli Zaretskii
2023-10-10  5:26           ` Yuchen Guo
2023-10-10 12:08             ` Eli Zaretskii
2023-10-10 12:59               ` Yuchen Guo
2023-10-10 13:40                 ` Eli Zaretskii
2023-10-10 16:26                   ` Yuchen Guo
2023-10-11 11:31                     ` Eli Zaretskii [this message]
2023-10-11 12:45                       ` Yuchen Guo
2023-10-11 13:12                         ` Eli Zaretskii
2023-10-10  4:39         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-09 18:44 ` bug#66416: Coredump Yuchen Guo
2023-10-12  7:46 ` bug#66416: GDB output from new crash Yuchen Guo
2023-10-12  8:12   ` Yuchen Guo
2023-10-12 10:23     ` Eli Zaretskii
2023-10-12 11:22       ` Yuchen Guo
2023-10-12 12:31         ` Eli Zaretskii
2023-10-12 13:58           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-12 14:28             ` Yuchen Guo
2023-10-12 14:42             ` Yuchen Guo
2023-10-14 11:00               ` Eli Zaretskii
2023-10-14 11:26                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 12:38                   ` Eli Zaretskii
2023-10-14 12:40                   ` Yuchen Guo
2023-10-14 12:44                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 14:23                       ` Yuchen Guo
2023-10-14 15:40                         ` Eli Zaretskii
2023-10-15  1:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-15  5:54                           ` Yuchen Guo
2023-10-12 11:43       ` Yuchen Guo
2023-10-14 19:14 ` bug#66416: 29.1; pgtk build crashes due to ftcrfont Yuchen Guo
2024-04-16  0:27   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]   ` <87mspui23l.fsf@>
2024-04-16 12:16     ` Eli Zaretskii
2024-04-16 13:13       ` Mattias Engdegård
2024-04-16 14:21         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 13:39       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 14:19         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838r89v1iv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=66416@debbugs.gnu.org \
    --cc=yguo@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.