unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18217: 24.3; font_unparse_xlfd generates defective font names
@ 2014-08-07 21:14 Christopher Oliver
  2019-10-09  1:14 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Oliver @ 2014-08-07 21:14 UTC (permalink / raw)
  To: 18217

[-- Attachment #1: Type: text/plain, Size: 4646 bytes --]

From: Christoper Oliver <oliver@onion.private>
To: bug-gnu-emacs@gnu.org
Subject: 24.3; font_unparse_xlfd generated defective font names.
--text follows this line--
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

In stock emacs 24.3, add the following to .emacs

(setq default-frame-alist
  `((font . "-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*")
    ,@default-frame-alist))

Start emacs under X, and try to bring up a new frame (C-X 5 2).  Observe the Invalid font
conplaint, and note the width is hyphenated contrary the the rules for xlfd naming.  This
also fails when starting a window with 'emacsclient -c'.  S. Monnier mentioned the bug in the
development list back in November of 2012; what became of this?

Attached is a patch that moves the proper xlfd names to the head of the style table entries.
This is definitely in "works for me" territory, but it seems to be doing the right thing under X.
How it would behave on other platforms, I've no clue as I've no access to them.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/local/share/emacs/24.3/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2014-08-07 on onion
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
Configured using:
 `configure '--prefix=/usr/local' '--with-x-toolkit=lucid' '--with-x'
 '--without-gsettings' '--without-gconf' '--program-suffix='
 '--program-prefix=' '--localstatedir=/var' 'CFLAGS=-O3 -mtune=generic''

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x <return>

Recent messages:
("emacs")
Loading /usr/local/share/emacs/site-lisp/snippets/text-mode/time...
Loading paren...done
Loading /home/staff/oliver/.emacs.d/lisp/init.el (source)...
Loading /usr/local/share/emacs/24.3/site-lisp/subdirs.el (source)...done
Loading /usr/local/share/emacs/24.3/site-lisp/subdirs.el (source)...done
Loading /home/staff/oliver/.emacs.d/lisp/init.el (source)...done
Starting Emacs daemon.
When done with this frame, type C-x 5 0

Load-path shadows:
/usr/local/share/emacs/site-lisp/t-mouse hides /usr/local/share/emacs/24.3/lisp/t-mouse
/usr/local/share/emacs/site-lisp/w3m/attic/rfc2368 hides /usr/local/share/emacs/24.3/lisp/mail/rfc2368
/usr/local/share/emacs/24.3/lisp/tree-widget hides /usr/local/dsp/share/emacs/site-lisp/SuperCollider/tree-widget

Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils smex ido server edmacro kmacro
byte-opt warnings bytecomp byte-compile cconv slime-autoloads wide-n
quick-yes advice help-fns cl-lib advice-preload time-date paren
cus-start cus-load tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting font-render-setting x-toolkit x multi-tty
emacs)


-- 
Christopher Oliver <current.input.port@gmail.com>

[-- Attachment #2: emacs-24.3-fontdesc.diff --]
[-- Type: application/octet-stream, Size: 2472 bytes --]

diff --git a/src/font.c b/src/font.c
index cb884f0..10d80be 100644
--- a/src/font.c
+++ b/src/font.c
@@ -71,15 +71,15 @@ struct table_entry
 static const struct table_entry weight_table[] =
 {
   { 0, { "thin" }},
-  { 20, { "ultra-light", "ultralight" }},
-  { 40, { "extra-light", "extralight" }},
+  { 20, { "ultralight", "ultra-light" }},
+  { 40, { "extralight", "extra-light" }},
   { 50, { "light" }},
-  { 75, { "semi-light", "semilight", "demilight", "book" }},
-  { 100, { "normal", "medium", "regular", "unspecified" }},
-  { 180, { "semi-bold", "semibold", "demibold", "demi" }},
+  { 75, { "semilight", "semi-light", "demilight", "book" }},
+  { 100, { "medium", "regular", "normal", "unspecified" }},
+  { 180, { "semibold", "semi-bold", "demibold", "demi" }},
   { 200, { "bold" }},
-  { 205, { "extra-bold", "extrabold" }},
-  { 210, { "ultra-bold", "ultrabold", "black" }}
+  { 205, { "extrabold", "extra-bold" }},
+  { 210, { "ultrabold", "ultra-bold", "black" }}
 };
 
 /* Table of slant numeric values and their names.  This table must be
@@ -89,9 +89,9 @@ static const struct table_entry slant_table[] =
 {
   { 0, { "reverse-oblique", "ro" }},
   { 10, { "reverse-italic", "ri" }},
-  { 100, { "normal", "r", "unspecified" }},
-  { 200, { "italic" ,"i", "ot" }},
-  { 210, { "oblique", "o" }}
+  { 100, { "r", "normal", "unspecified" }},
+  { 200, { "i", "italic", "ot" }},
+  { 210, { "o", "oblique" }}
 };
 
 /* Table of width numeric values and their names.  This table must be
@@ -99,15 +99,15 @@ static const struct table_entry slant_table[] =
 
 static const struct table_entry width_table[] =
 {
-  { 50, { "ultra-condensed", "ultracondensed" }},
-  { 63, { "extra-condensed", "extracondensed" }},
+  { 50, { "ultracondensed", "ultra-condensed" }},
+  { 63, { "extracondensed", "extra-condensed" }},
   { 75, { "condensed", "compressed", "narrow" }},
-  { 87, { "semi-condensed", "semicondensed", "demicondensed" }},
+  { 87, { "semicondensed", "semi-condensed", "demicondensed" }},
   { 100, { "normal", "medium", "regular", "unspecified" }},
-  { 113, { "semi-expanded", "semiexpanded", "demiexpanded" }},
+  { 113, { "semiexpanded", "semi-expanded", "demiexpanded" }},
   { 125, { "expanded" }},
-  { 150, { "extra-expanded", "extraexpanded" }},
-  { 200, { "ultra-expanded", "ultraexpanded", "wide" }}
+  { 150, { "extraexpanded", "extra-expanded" }},
+  { 200, { "ultraexpanded", "ultra-expanded", "wide" }}
 };
 
 Lisp_Object QCfoundry;

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

* bug#18217: 24.3; font_unparse_xlfd generates defective font names
  2014-08-07 21:14 bug#18217: 24.3; font_unparse_xlfd generates defective font names Christopher Oliver
@ 2019-10-09  1:14 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09  1:14 UTC (permalink / raw)
  To: Christopher Oliver; +Cc: 18217

Christopher Oliver <current.input.port@gmail.com> writes:

> In stock emacs 24.3, add the following to .emacs
>
> (setq default-frame-alist
>   `((font . "-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*")
>     ,@default-frame-alist))
>
> Start emacs under X, and try to bring up a new frame (C-X 5 2).
> Observe the Invalid font conplaint, and note the width is hyphenated
> contrary the the rules for xlfd naming.

I tried this in Emacs 27, and I did not get any warnings (and it looked
like it opened the frame with the correct font).  So I'm going to guess
that this has been fixed in the years since this bug was reported, and
I'm closing this bug report.  If the bug is still present, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-10-09  1:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07 21:14 bug#18217: 24.3; font_unparse_xlfd generates defective font names Christopher Oliver
2019-10-09  1:14 ` Lars Ingebrigtsen

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