From: Eli Zaretskii <eliz@gnu.org>
To: Dima Kogan <dima@secretsauce.net>
Cc: 19117@debbugs.gnu.org
Subject: bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes
Date: Sun, 07 Dec 2014 18:12:05 +0200 [thread overview]
Message-ID: <83egsbzbfu.fsf@gnu.org> (raw)
In-Reply-To: <87a92zrj4b.fsf@secretsauce.net>
> From: Dima Kogan <dima@secretsauce.net>
> Date: Sat, 06 Dec 2014 23:28:34 -0800
>
> > Put a breakpoint where Emacs loads new fonts, and see who calls that
> > code.
>
> I'm digging through the code. It's slow going so far, but I'm getting
> more familiar with it. In my init.el I have in my default-frame-alist
>
> (font . "-adobe-courier-medium-r-*-*-*-80-*-*-m-*-iso8859-1")
>
> I'm looking at realize_x_face() in xfaces.c. When I create a new frame
> by pressing C-x 5 2, all the faces get re-realized, and I can see which
> fonts are chosen. That function takes in a list of face attributes, and
> associates a font with each face. I'm looking at attrs[LFACE_FONT_INDEX]
> on input and face->font on output. For most faces, these two values are
>
> #<font-object "-adobe-courier-medium-r-normal--11-80-100-100-m-60-iso8859-1">
> "-adobe-courier-medium-r-normal--11-80-100-100-m-60-iso8859-1"
>
> which is correct: we're asking for a particular font and we're getting
> it.
the above is a font object.
> For many faces, however these values are
>
> #<font-spec nil adobe courier ## iso8859-1 medium nil normal 11 100 100 60 ((user-spec . "-adobe-courier-medium-r-*-*-*-80-*-*-m-*-iso8859-1"))>
> "-urw-nimbus mono l-regular-o-normal--11-79-100-100-p-70-iso8859-1"
>
> or
>
> #<font-spec nil adobe courier ## iso8859-1 medium nil normal 11 100 100 60 ((user-spec . "-adobe-courier-medium-r-*-*-*-80-*-*-m-*-iso8859-1"))>
> "-adobe-courier-medium-o-normal--11-80-100-100-m-60-iso8859-1"
These two aren't font objects, they are font specs, a different
object. See font.h for their respective descriptions (unless you
already read that).
> Here we're requesting a slanted version of the default font. Sometimes
> emacs picks the right one (-adobe-courier-medium-o-...), but at other
> times it picks the wrong one (-urw-....). The exact set of faces that
> get the wrong font varies with each invocation of realize_x_face(), but
> there's always at least one wrong one.
Does the backtrace tell something about the reason(s) for the
differences?
next prev parent reply other threads:[~2014-12-07 16:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 6:13 bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes Dima Kogan
2014-11-20 16:10 ` Eli Zaretskii
2014-12-07 7:28 ` Dima Kogan
2014-12-07 16:12 ` Eli Zaretskii [this message]
2014-12-17 5:36 ` Dima Kogan
2014-12-17 6:57 ` Dima Kogan
2014-12-18 16:24 ` Eli Zaretskii
2014-12-20 8:08 ` Jan Djärv
2014-12-19 15:28 ` Dmitry Antipov
2014-12-19 22:46 ` Dima Kogan
2014-12-22 8:01 ` Dmitry Antipov
2014-12-22 8:28 ` Jan Djärv
2014-12-26 19:43 ` Dima Kogan
2014-12-27 2:17 ` Stefan Monnier
2014-12-27 9:17 ` Dima Kogan
2014-12-30 9:44 ` Dima Kogan
2014-12-30 16:57 ` Stefan Monnier
2014-12-30 18:33 ` Dima Kogan
2014-12-30 20:05 ` Eli Zaretskii
2014-12-31 4:06 ` Dima Kogan
2015-01-02 9:43 ` Eli Zaretskii
2015-01-02 21:07 ` Dima Kogan
2015-02-02 8:10 ` Dima Kogan
2015-02-03 17:53 ` Stefan Monnier
2015-02-05 2:41 ` handa
2015-02-15 13:47 ` K. Handa
2015-02-05 15:08 ` Jan D.
2015-02-05 20:41 ` Dima Kogan
2015-02-07 7:24 ` Jan D.
2015-02-07 7:59 ` Jan D.
2015-02-07 8:28 ` Dima Kogan
2015-02-09 14:58 ` Jan D.
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83egsbzbfu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=19117@debbugs.gnu.org \
--cc=dima@secretsauce.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).