all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6437: 23.2; Fail to parse GTK font size with decimal point
@ 2010-06-16  8:15 Keith Packard
  2010-06-22  6:44 ` Jan Djärv
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Packard @ 2010-06-16  8:15 UTC (permalink / raw
  To: 6437

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


Running emacs-gtk, I have my default font set to 'Monospace 7.5' in
gconf which causes emacs to fail to start with the following error
message:

$ emacs
Font `Monospace 7.5' is not defined


Emacs is mis-parsing the font name, not allowing for the point size
field to contain a decimal point.

Here's a patch:

diff --git a/src/font.c b/src/font.c
index 7657121..cdaa16e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1544,7 +1544,7 @@ font_parse_fcname (name, font)
              int size_found = 1;
 
              for (q = p + 1; *q && *q != ' '; q++)
-               if (! isdigit (*q))
+               if (! isdigit (*q) && *q != '.')
                  {
                    size_found = 0;
                    break;

In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-16 on aiko, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10899901
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t <tab> <return>

Recent messages:
Loading /etc/emacs/site-start.d/50git-core.el (source)...done
Loading /etc/emacs/site-start.d/50gtk-doc-tools.el (source)...done
Loading /etc/emacs/site-start.d/50lilypond-data.el (source)...done
Loading /etc/emacs/site-start.d/50mgp.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done
Loading /etc/emacs/site-start.d/50w3m-el.el (source)...done
Loading /etc/emacs/site-start.d/50w3m-el-snapshot.el (source)...done
Connection file "/tmp/emacs1488/server" deleted
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/share/emacs23/site-lisp/flim/sha1 hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/sha1
/usr/share/emacs23/site-lisp/flim/hex-util hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/hex-util
/usr/share/emacs23/site-lisp/flim/md4 hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/md4
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/flim/sasl-ntlm hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl-ntlm
/usr/share/emacs23/site-lisp/flim/hmac-def hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/hmac-def
/usr/share/emacs23/site-lisp/flim/sasl-digest hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl-digest
/usr/share/emacs23/site-lisp/flim/hmac-md5 hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/hmac-md5
/usr/share/emacs23/site-lisp/flim/sasl hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl
/usr/share/emacs23/site-lisp/flim/sasl-cram hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl-cram
/usr/share/emacs23/site-lisp/flim/ntlm hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/ntlm
/usr/share/emacs/23.2/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/local/src/debian/emacs23-23.2+1/debian/build-x/lisp/textmodes/rst hides /usr/share/emacs/site-lisp/rst
/local/src/debian/emacs23-23.2+1/debian/build-x/leim/leim-list hides /usr/share/emacs/23.2/leim/leim-list

Features:
(shadow sort flyspell ispell mail-extr emacsbug uniquify bbdb-com advice
help-fns advice-preload bbdb timezone notmuch notmuch-message
notmuch-maildir-fcc notmuch-hello notmuch-show notmuch-mua
notmuch-address notmuch-wash diff-mode easy-mmode coolj notmuch-query
json notmuch-lib message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec mailabbrev nnheader gmm-utils wid-edit mailheader
canlock sha1 sha1-el hex-util hashcash mail-utils mm-view smime
password-cache dig mm-decode gnus-util netrc mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mm-util time-date
mail-prsvr cl cl-19 server w3m-load devhelp bbdb-autoloads tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)

[-- Attachment #2.1: Type: text/plain, Size: 32 bytes --]


-- 
keith.packard@intel.com

[-- Attachment #2.2: Type: application/pgp-signature, Size: 189 bytes --]

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

* bug#6437: 23.2; Fail to parse GTK font size with decimal point
  2010-06-16  8:15 bug#6437: 23.2; Fail to parse GTK font size with decimal point Keith Packard
@ 2010-06-22  6:44 ` Jan Djärv
  2011-09-21 20:38   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Djärv @ 2010-06-22  6:44 UTC (permalink / raw
  To: Keith Packard; +Cc: 6437

2010-06-16 10:15, Keith Packard skrev:
>
> Running emacs-gtk, I have my default font set to 'Monospace 7.5' in
> gconf which causes emacs to fail to start with the following error
> message:
>
> $ emacs
> Font `Monospace 7.5' is not defined
>
>
> Emacs is mis-parsing the font name, not allowing for the point size
> field to contain a decimal point.
>
> Here's a patch:
>
> diff --git a/src/font.c b/src/font.c
> index 7657121..cdaa16e 100644
> --- a/src/font.c
> +++ b/src/font.c
> @@ -1544,7 +1544,7 @@ font_parse_fcname (name, font)
>                int size_found = 1;
>
>                for (q = p + 1; *q&&  *q != ' '; q++)
> -               if (! isdigit (*q))
> +               if (! isdigit (*q)&&  *q != '.')
>                    {
>                      size_found = 0;
>                      break;
>

Applied.  But on my system it seems I get 7 even if I specify 7.5.  I tried a 
couple of applications, they all behave the same.

	Jan D.








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

* bug#6437: 23.2; Fail to parse GTK font size with decimal point
  2010-06-22  6:44 ` Jan Djärv
@ 2011-09-21 20:38   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-21 20:38 UTC (permalink / raw
  To: Jan Djärv; +Cc: Keith Packard, 6437

Jan Djärv <jan.h.d@swipnet.se> writes:

>> Running emacs-gtk, I have my default font set to 'Monospace 7.5' in
>> gconf which causes emacs to fail to start with the following error
>> message:

[...]

> Applied.  But on my system it seems I get 7 even if I specify 7.5.  I
> tried a couple of applications, they all behave the same.

But apparently the patch fixed the bug on the original reporter's
system?  There was no followup here, so I'm closing the bug report, but
if it turns out that this is still a problem, please reopen.

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





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

end of thread, other threads:[~2011-09-21 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16  8:15 bug#6437: 23.2; Fail to parse GTK font size with decimal point Keith Packard
2010-06-22  6:44 ` Jan Djärv
2011-09-21 20:38   ` Lars Magne Ingebrigtsen

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.