all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 17457@debbugs.gnu.org
Subject: bug#17457: 24.4.50; REGRESSION: "Invalid font name: -outline-Lucida	Console-normal-normal-normal-mono"
Date: Sat, 10 May 2014 22:23:41 -0700 (PDT)	[thread overview]
Message-ID: <cadd8cdd-0fd8-454a-9f82-901c41e19423@default> (raw)
In-Reply-To: <<83eh01udux.fsf@gnu.org>>

> > Subject line says it all.  No problem in Emacs 24 or prior releases:
> >
> > M-: (font-info "-outline-Lucida Console-normal-normal-normal-mono")
> > ["-outline-Arial-normal-normal-normal-sans-20-*-*-*-p-*-iso8859-1"
> > "Arial-12.0" 20 23 0 0 19]
> 
> What do you get in prior releases, and why do you think that output is
> correct?

In prior releases (Emacs 23 through 24.3) I get what I showed above
for prior releases.  Why should I think it is not correct?  Why
should Emacs suddenly start treating it as invalid?

OK, yes, it seems weird that the font info returned seems to be for
a different font in this case!  I'll grant you that perhaps there is
an Emacs bug there to be fixed.

But at least in previous versions Emacs did not claim the font was
invalid.  I don't see why it would be invalid (either the Lucida
font or the Arial font that Emacs apparently used to think it was
looking at).

Lucida Console is in fact the font currently in use in the frame
where I ask for the value (when I test with my setup, which uses
that font by default).  This is what the frame parameter `font'
value is:

"-outline-Lucida Console-normal-normal-normal-mono-14-*-*-*-c-*-iso8859-1"

Where did I get the value of the arg I pass to `font-info'?
From here: (append fontset-lst (x-list-fonts "*")), where
FONTSET-LST is this;

(let ((fontset-lst  (fontset-list)))
  (setq fontset-lst
        (delete "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
                fontset-lst))
  ...)

I map `font-info' over the above list composed of `fontset-list'
fonts and `x-list-fonts' fonts.  I have been doing so for a
long time.

I really hadn't noticed until now that for the Lucida font `font-info'
apparently returned information for a different font (Arial).  But in
general it has worked well.  The info I use from `font-info' is just this:

(format
 "pixelsize: %s, pixelheight: %s, offset: %s, compose: %s, ascent: %s"
 (aref font-info iii) (aref font-info (+ iii 1))
 (aref font-info (+ iii 2)) (aref font-info (+ iii 3))
 (aref font-info (+ iii 4)))

And that seemed to be OK generally, but I admit that I didn't
check that it is always using the right font.  What I can say is
that the values for those parts(in previous versions) are different 
for different fonts.  And for a font that is not yet loaded I do get
a nil value returned from `font-info'.  Now, with the builds since
2013-06-18, I get an invalid-font error instead.

> This is in "emacs -Q", btw, right?

Yes.  And no - it makes no difference: Both with my setup and 
with emacs -Q I get the same behavior, both for previous versions
(where Emacs raises no error and returns the vector above) and
for the reported regression builds.

`font-info' is supposed to return either font info or nil if the
font is not yet loaded.  In my case the Lucida font is loaded
(even for emacs -Q).





       reply	other threads:[~2014-05-11  5:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<a68b8275-2f8b-4e80-8e34-5905d809da11@default>
     [not found] ` <<83eh01udux.fsf@gnu.org>
2014-05-11  5:23   ` Drew Adams [this message]
2014-05-11 16:03     ` bug#17457: 24.4.50; REGRESSION: "Invalid font name: -outline-Lucida Console-normal-normal-normal-mono" Eli Zaretskii
     [not found]   ` <<cadd8cdd-0fd8-454a-9f82-901c41e19423@default>
     [not found]     ` <<83a9aouwtj.fsf@gnu.org>
2014-05-11 17:19       ` Drew Adams
2014-05-11 17:41         ` Eli Zaretskii
     [not found]       ` <<c873b85c-4ea9-462f-b2a4-4761a218b2e1@default>
     [not found]         ` <<834n0wus9k.fsf@gnu.org>
2014-05-11 19:23           ` Drew Adams
2014-05-11  1:57 Drew Adams
2014-05-11  2:07 ` Drew Adams
2014-05-11  4:40 ` Eli Zaretskii

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=cadd8cdd-0fd8-454a-9f82-901c41e19423@default \
    --to=drew.adams@oracle.com \
    --cc=17457@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.