unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12823: Invalid font name
@ 2012-11-07 15:15 Stefan Monnier
  2012-11-07 16:52 ` Jan Djärv
  2012-11-09 14:07 ` Kenichi Handa
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2012-11-07 15:15 UTC (permalink / raw)
  To: 12823

Package: Emacs
Version: 24.3.50

After letting xft use bitmap fonts on my system, Emacs started to crash,
which was tracked to an invalid font name that was used
without checking.
So I added

	  if (NILP (spec))
	    signal_error ("Invalid font name", ascii_font);

to x_set_font in revno 110704, but this only prevents the crash,
replacing it with an error.  Basically the error is that ascii_font is
not a valid XLFD font name because one of its fields has a "-" in its
name, and since fields are separated by "-", this leads to a misparse.

Now, this invalid name was built by Emacs, probably in
font_unparse_xlfd.  The appended patch fixes my problem.

So now the question is: should we reorder all the entries in the
width_table, slant_table, and weight_table so that the first entry of
every line is a non-dashed name?  Or could this have undesirable effects?


        Stefan


=== modified file 'src/font.c'
--- src/font.c	2012-11-06 03:17:56 +0000
+++ src/font.c	2012-11-07 15:04:24 +0000
@@ -102,7 +102,7 @@
   { 50, { "ultra-condensed", "ultracondensed" }},
   { 63, { "extra-condensed", "extracondensed" }},
   { 75, { "condensed", "compressed", "narrow" }},
-  { 87, { "semi-condensed", "semicondensed", "demicondensed" }},
+  { 87, { "semicondensed", "semi-condensed", "demicondensed" }},
   { 100, { "normal", "medium", "regular", "unspecified" }},
   { 113, { "semi-expanded", "semiexpanded", "demiexpanded" }},
   { 125, { "expanded" }},






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-12-03 17:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 15:15 bug#12823: Invalid font name Stefan Monnier
2012-11-07 16:52 ` Jan Djärv
2012-11-09 14:07 ` Kenichi Handa
2012-11-13 11:55   ` Kenichi Handa
2012-11-13 19:25     ` Andreas Schwab
2012-11-15 13:30       ` Kenichi Handa
2012-11-27 14:26         ` Kenichi Handa
2012-11-27 15:10           ` Stefan Monnier
2012-11-28  9:20             ` Kenichi Handa
2012-11-28 14:57               ` Stefan Monnier
2012-12-03  9:21                 ` Kenichi Handa
2012-12-03 17:51                   ` Stefan Monnier

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).