all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sebastian Urban <mrsebastianurban@gmail.com>
Cc: 42603@debbugs.gnu.org
Subject: bug#42603: EWW shows chars > #xFF with font set by "set-fontset-font"
Date: Fri, 31 Jul 2020 15:43:49 +0300	[thread overview]
Message-ID: <83k0yjetx6.fsf@gnu.org> (raw)
In-Reply-To: <73d8c2fe-5c7e-43d0-d7c0-81199eb69510@gmail.com> (message from Sebastian Urban on Fri, 31 Jul 2020 14:01:49 +0200)

> From: Sebastian Urban <mrsebastianurban@gmail.com>
> Cc: 42603@debbugs.gnu.org
> Date: Fri, 31 Jul 2020 14:01:49 +0200
> 
> >> 2. M-: (set-fontset-font t 'unicode "Times New Roman")
> >
> > This setting makes no sense: no single font can cover all of Unicode,
> > so you should never do that.
> >
> > Why did you think you needed to do it in your case?
> 
> My use case is not related to EWW, but to fonts overall.  I use it to
> "prevent" Emacs from searching for fonts, and to display codes of
> characters instead of glyphs, to speed up loading text in situations
> like in case of view-hello-file.

In that case, you should indeed use set-fontset-font, but instead of
telling Emacs that each of the fonts covers all of the Unicode, you
should tell Emacs which ranges of characters, or which scripts, should
be rendered by what fonts.

>     (set-fontset-font "fontset-default" 'unicode "Consolas")
>     (set-fontset-font "fontset-default" 'unicode "Symbola" nil 'append)

Instead of using 'unicode' in the above 2 lines, use either symbols of
scripts you want to render with each font, or explicit ranges of
character codepoints.  The node "Modifying Fontsets" in the Emacs user
manual and the node "Fontsets" in the ELisp manual have examples of
how to do that.

> When I type C-u C-x = on any of above letters, it says:
>     There are text properties here:
>       face                 variable-pitch
> and the variable-pitch says Arial, but it's not Arial.

You countermanded that with you over-optimistic set-fontset-font
setting, I think.

> I DON'T want to change whole text to TNR, or any other font, with this
> command, quite the opposite, I don't want IT to change chars above
> 256, in EWW buffer that uses variable-pitch font, which is Arial.

Then why did you use this:

  (set-fontset-font t 'unicode "Times New Roman")

?  It tells Emacs the opposite: to use Times New Roman for _any_
character (because the 'unicode' script spans all the characters you
can possibly have).





  reply	other threads:[~2020-07-31 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 16:26 bug#42603: EWW shows chars > #xFF with font set by "set-fontset-font" Sebastian Urban
2020-07-29 18:46 ` Eli Zaretskii
2020-07-29 19:02   ` Eli Zaretskii
2020-07-31 12:01     ` Sebastian Urban
2020-07-31 12:43       ` Eli Zaretskii [this message]
2020-07-31 16:10         ` Sebastian Urban
2020-07-31 17:49           ` Eli Zaretskii
2020-08-03 18:39             ` Sebastian Urban

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=83k0yjetx6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42603@debbugs.gnu.org \
    --cc=mrsebastianurban@gmail.com \
    /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.