GNU bug report logs -
#12823
Invalid font name
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Wed, 7 Nov 2012 15:16:01 UTC
Severity: normal
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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" }},
This bug report was last modified 10 years and 162 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.