GNU bug report logs - #578
23.0.60; Cocoa, Font dialog doesn't set font size

Previous Next

Packages: emacs, ns;

Reported by: Benjamin Riefenstahl <benny <at> sueton.benny.turtle-trading.net>

Date: Sat, 19 Jul 2008 16:30:03 UTC

Severity: normal

Done: Adrian Robert <adrian.b.robert <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 578 in the body.
You can then email your comments to 578 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#578; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Benjamin Riefenstahl <benny <at> sueton.benny.turtle-trading.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Benjamin Riefenstahl <benny <at> sueton.benny.turtle-trading.net>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; Cocoa, Font dialog doesn't set font size
Date: Sat, 19 Jul 2008 17:10:39 +0200
[Message part 1 (text/plain, inline)]
In GNU Emacs 23.0.60.1 (powerpc-apple-darwin8.11.0, *Step 9.0)
 of 2008-07-19 on sueton.benny.turtle-trading.net
configured using `configure  '--with-ns' '--with-png' '--with-gif' '--with-jpeg' '--with-tiff''

When setting the font via the font dialog either from the menu item
"Set Default Font..." or from the preferenc es dialog, only the font
family, but not the font size is actually configured.

The attached patch fixes the problem by passing XLFDs around instead
of Mac font names and eliminating the "FontSize" parameter from the
defaults database.


2008-07-19  Benjamin Riefenstahl  <b.riefenstahl <at> turtle-trading.net>

	* lisp/term/ns-win.el (ns-save-preferences): Do not save defaults
	 parameter "FontSize".
	 (ns-respond-to-change-font): Construct an XLFD to pass to
	 set-frame-font.
	* src/nsfns.m (Fns_create_frame): Do not use defaults parameter
	"FontSize".


[fontsize.diff (text/x-patch, inline)]
Index: src/nsfns.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfns.m,v
retrieving revision 1.6
diff -u -p -r1.6 nsfns.m
--- src/nsfns.m	17 Jul 2008 13:50:27 -0000	1.6
+++ src/nsfns.m	19 Jul 2008 13:48:28 -0000
@@ -1180,9 +1181,6 @@ be shared by the new frame.")
   {
     /* use for default font name */
     id font = [NSFont userFixedPitchFontOfSize: -1.0]; /* default */
-    tfontsize = x_default_parameter (f, parms, Qfontsize,
-                                    make_number (0 /*(int)[font pointSize]*/),
-                                    "fontSize", "FontSize", RES_TYPE_NUMBER);
     tfont = x_default_parameter (f, parms, Qfont,
                                  build_string ([[font fontName] UTF8String]),
                                  "font", "Font", RES_TYPE_STRING);
Index: lisp/term/ns-win.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/term/ns-win.el,v
retrieving revision 1.11
diff -u -p -r1.11 ns-win.el
--- lisp/term/ns-win.el	19 Jul 2008 01:15:10 -0000	1.11
+++ lisp/term/ns-win.el	19 Jul 2008 13:48:29 -0000
@@ -1038,9 +1038,7 @@ Lines are highlighted according to `ns-i
   (let ((p (frame-parameters))
 	v)
     (if (setq v (assq 'font p))
-	(ns-set-resource nil "Font" (ns-font-name (cdr v))))
-    (if (setq v (assq 'fontsize p))
-	(ns-set-resource nil "FontSize" (number-to-string (cdr v))))
+	(ns-set-resource nil "Font" (cdr v)))
     (if (setq v (assq 'foreground-color p))
 	(ns-set-resource nil "Foreground" (cdr v)))
     (if (setq v (assq 'background-color p))
@@ -1325,10 +1322,9 @@ cursor display.  On a text-only terminal
   "Respond to changeFont: event, expecting ns-input-font and\n\
 ns-input-fontsize of new font."
   (interactive)
-  (modify-frame-parameters (selected-frame)
-                           (list (cons 'font ns-input-font)
-                                 (cons 'fontsize ns-input-fontsize)))
-  (set-frame-font ns-input-font))
+  (set-frame-font
+   (font-xlfd-name
+    (font-spec :family ns-input-font :size (float ns-input-fontsize)))))
 
 
 ;; Default fontset for Mac OS X.  This is mainly here to show how a fontset

bug reassigned from package `emacs' to `emacs,ns'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 12 Aug 2008 06:50:09 GMT) Full text and rfc822 format available.

Reply sent to Adrian Robert <adrian.b.robert <at> gmail.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Benjamin Riefenstahl <benny <at> sueton.benny.turtle-trading.net>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #12 received at 578-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: 578-done <at> debbugs.gnu.org
Subject: #578 - 23.0.60; Cocoa, Font dialog doesn't set font size - Emacs bug report logs
Date: Fri, 3 Oct 2008 14:08:46 -0400
This regression was resolved by a different change, by Adrian Robert  
on 2008-07-19 to restore some NS-specific functionality that was  
accidentally removed from font.c during the NS port merge.





bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Sat, 01 Nov 2008 14:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.