bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#578: marked as done (23.0.60; Cocoa, Font dialog doesn't set font s


From: Emacs bug Tracking System
Subject: bug#578: marked as done (23.0.60; Cocoa, Font dialog doesn't set font size)
Date: Fri, 3 Oct 2008 11:15:03 -0700

Your message dated Fri, 3 Oct 2008 14:08:46 -0400
with message-id <87390190-A658-4DCD-AAD3-33EBD5393518@gmail.com>
and subject line #578 - 23.0.60; Cocoa, Font dialog doesn't set font size - 
Emacs bug report logs
has caused the Emacs bug report #578,
regarding 23.0.60; Cocoa, Font dialog doesn't set font size
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
578: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=578
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
--- Begin Message --- Subject: 23.0.60; Cocoa, Font dialog doesn't set font size Date: Sat, 19 Jul 2008 17:10:39 +0200
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@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".


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

--- End Message ---
--- Begin Message --- 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.



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]