bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17457: 24.4.50; REGRESSION: "Invalid font name: -outline-Lucida Cons


From: Drew Adams
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)

> > 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 via email to

[Prev in Thread] Current Thread [Next in Thread]