From: handa <handa@gnu.org>
To: Thomas Morgan <tlm@ziiuu.com>
Cc: 29630@debbugs.gnu.org
Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute
Date: Wed, 27 Dec 2017 21:33:04 +0900 [thread overview]
Message-ID: <87wp18gxkv.fsf@gnu.org> (raw)
In-Reply-To: <87zi68elz1.fsf@ziiuu.com> (message from Thomas Morgan on Sat, 23 Dec 2017 21:25:22 -0800)
In article <87zi68elz1.fsf@ziiuu.com>, Thomas Morgan <tlm@ziiuu.com> writes:
> `:font'
> [...] If you specify a string, the contents of the string should
> be a font name (*note (emacs)Fonts::); if the font name is an XLFD
> containing wildcards, Emacs chooses the first font matching those
> wildcards. [...]
> Would it make sense to add the following after the quoted sentence?
> You may also specify a fontset name as a string. For reasons of
> backward compatibility, in the case of the `default' face this may
> automatically generate a new fontset based on the family, weight,
> size, and other font-related properties of the specified fontset.
The generation of a new fontset happens every time you change a font of
the default face; not only when you specify a fontset for :font.
So, here, as an explanation of :font, I think what we have to say is that
specifying a fontset name is the same as specifying a font that the
fontset defines for ASCII. For instance,
Even if yoy create a fontset as this name:
(create-fontset-from-fontset-spec
"-*-dejavu sans mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-dejavu")
when you do:
(set-fontset-font "fontset-dejavu" 'unicode-bmp (font-spec :family "Freemono"))
giving "fontset-dejavu" to :font is the same as giving
(font-spec :family "Freemono").
> It would probably also be helpful to document the :fontset attribute
> in the manual, if that's the proper way to specify a fontset for the
> the frame's default face.
I don't remember how :fontset attribute works here, sorry. :-(
I tried:
(set-face-attribute 'default nil :fontset "fontset-dejavu")
but it seems that it has no effect?!?
On the other hand,
(modify-frame-parameters nil '((font . "fontset-dejavu")))
works.
> > At least, calling set-fontset-font for the fontset of the current frame
> > should work... and worked as far as I rememnber... but I've just found
> > that this does not work with the latest Emacs?!?
> >
> > (set-fontset-font nil 'unicode-bmp "dejavu sans mono")
> > (set-fontset-font nil 'unicode-bmp "Freemono" nil 'append)
> >
> > I'm now checking what is wrong.
That was my misunderstanding, sorry. I have two versions of freemono
fonts, ttf and otf, and Emacs (or fontconfig) found otf version, but I
was expecting ttf version that has more glyphs.
---
K. Handa
handa@gnu.org
prev parent reply other threads:[~2017-12-27 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-09 21:26 bug#29630: 25.3; Unable to change fontset using :family face attribute Thomas Morgan
2017-12-10 17:24 ` Eli Zaretskii
2017-12-21 15:19 ` handa
2017-12-24 5:25 ` Thomas Morgan
2017-12-27 12:33 ` handa [this message]
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=87wp18gxkv.fsf@gnu.org \
--to=handa@gnu.org \
--cc=29630@debbugs.gnu.org \
--cc=tlm@ziiuu.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.