From unknown Sat Jun 21 12:30:21 2025 X-Loop: don@donarmstrong.com Subject: bug#578: 23.0.60; Cocoa, Font dialog doesn't set font size Reply-To: Benjamin Riefenstahl , 578@debbugs.gnu.org Resent-From: Benjamin Riefenstahl Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 19 Jul 2008 16:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 578 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121648459415688 (code B ref -1); Sat, 19 Jul 2008 16:30:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.9 required=4.0 tests=BAYES_00,FOURLA, FVGT_m_MULTI_ODD,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 19 Jul 2008 16:23:14 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6JGN9Ys015682 for ; Sat, 19 Jul 2008 09:23:11 -0700 Received: from mx10.gnu.org ([199.232.76.166]:58323) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KKFCY-0008HZ-8A for emacs-pretest-bug@gnu.org; Sat, 19 Jul 2008 12:22:30 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KKFD6-00015d-1d for emacs-pretest-bug@gnu.org; Sat, 19 Jul 2008 12:23:08 -0400 Received: from [193.99.153.100] (port=2608 helo=blei.turtle-trading.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KKFD5-00013O-CV for emacs-pretest-bug@gnu.org; Sat, 19 Jul 2008 12:23:03 -0400 Received: from sueton.benny.turtle-trading.net (sueton.benny.turtle-trading.net [193.99.153.25]) by blei.turtle-trading.net (8.12.10/8.12.10) with ESMTP id m6JEe368026264 for ; Sat, 19 Jul 2008 16:40:03 +0200 Received: by sueton.benny.turtle-trading.net (Postfix, from userid 501) id 2FC7F1A00923; Sat, 19 Jul 2008 17:10:39 +0200 (CEST) From: Benjamin Riefenstahl To: emacs-pretest-bug@gnu.org Date: Sat, 19 Jul 2008 17:10:39 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-Greylist: delayed 4337 seconds by postgrey-1.27 at monty-python; Sat, 19 Jul 2008 12:23:02 EDT --=-=-= 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 * 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". --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=fontsize.diff 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 --=-=-=-- From unknown Sat Jun 21 12:30:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Benjamin Riefenstahl Subject: bug#578 closed by Adrian Robert (#578 - 23.0.60; Cocoa, Font dialog doesn't set font size - Emacs bug report logs) Message-ID: References: <87390190-A658-4DCD-AAD3-33EBD5393518@gmail.com> X-Emacs-PR-Message: they-closed 578 X-Emacs-PR-Package: emacs,ns Reply-To: 578@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1223057703-28984-1" This is a multi-part message in MIME format... ------------=_1223057703-28984-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs,ns package: #578: 23.0.60; Cocoa, Font dialog doesn't set font size It has been closed by Adrian Robert . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Adrian Robert by replying to this email. --=20 578: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D578 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1223057703-28984-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From adrian.b.robert@gmail.com Fri Oct 3 11:09:29 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 578-done) by emacsbugs.donarmstrong.com; 3 Oct 2008 18:09:29 +0000 Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.177]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m93I9PHA027598 for <578-done@emacsbugs.donarmstrong.com>; Fri, 3 Oct 2008 11:09:27 -0700 Received: by el-out-1112.google.com with SMTP id r27so866453ele.22 for <578-done@emacsbugs.donarmstrong.com>; Fri, 03 Oct 2008 11:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=ain1DQc8IhEQw0BVtkA+9rWHADsKrrbWbsHzt7NDOLo=; b=tgPkto2BBrn1zD8gatQqcHh5Y5xtV0vDQkCj7xAIBdz3w5AF/odxo9OEjeaQlNC7AP aDt5NPmER4dlKmsPjfLNuwxzer93MuAjCY06l3/sflcuwbVhpAjTKaJ0cYdvVXJDa91Y qrHbxAL7VNnkE0Ty43JKgM44yUlm0widgKIfE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=GU/9cHQlbK0OJvpuNpBK1lsXUMtIvLYFCA/qGy+G6LbKCDx7HFV3MflAgEnprk4Djl Y6MBzcmAZDY1Ss6vaQcq90cHumreug2qphDbl7jL39uWJyODplBtn4wAAz3NENY95fKL 1Ur//4Ef0e3fEZ5sdkzAW6Rv77oI7Z2y0z9R4= Received: by 10.90.50.5 with SMTP id x5mr1614696agx.120.1223057365156; Fri, 03 Oct 2008 11:09:25 -0700 (PDT) Received: from ?10.0.1.199? ([72.169.150.82]) by mx.google.com with ESMTPS id 52sm3098hsf.1.2008.10.03.11.09.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Oct 2008 11:09:18 -0700 (PDT) Message-Id: <87390190-A658-4DCD-AAD3-33EBD5393518@gmail.com> From: Adrian Robert To: 578-done@debbugs.gnu.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) 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 X-Mailer: Apple Mail (2.926) 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. ------------=_1223057703-28984-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From benny@turtle-trading.net Sat Jul 19 09:23:14 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.9 required=4.0 tests=BAYES_00,FOURLA, FVGT_m_MULTI_ODD,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 19 Jul 2008 16:23:14 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6JGN9Ys015682 for ; Sat, 19 Jul 2008 09:23:11 -0700 Received: from mx10.gnu.org ([199.232.76.166]:58323) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KKFCY-0008HZ-8A for emacs-pretest-bug@gnu.org; Sat, 19 Jul 2008 12:22:30 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KKFD6-00015d-1d for emacs-pretest-bug@gnu.org; Sat, 19 Jul 2008 12:23:08 -0400 Received: from [193.99.153.100] (port=2608 helo=blei.turtle-trading.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KKFD5-00013O-CV for emacs-pretest-bug@gnu.org; Sat, 19 Jul 2008 12:23:03 -0400 Received: from sueton.benny.turtle-trading.net (sueton.benny.turtle-trading.net [193.99.153.25]) by blei.turtle-trading.net (8.12.10/8.12.10) with ESMTP id m6JEe368026264 for ; Sat, 19 Jul 2008 16:40:03 +0200 Received: by sueton.benny.turtle-trading.net (Postfix, from userid 501) id 2FC7F1A00923; Sat, 19 Jul 2008 17:10:39 +0200 (CEST) From: Benjamin Riefenstahl To: emacs-pretest-bug@gnu.org Subject: 23.0.60; Cocoa, Font dialog doesn't set font size Date: Sat, 19 Jul 2008 17:10:39 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-Greylist: delayed 4337 seconds by postgrey-1.27 at monty-python; Sat, 19 Jul 2008 12:23:02 EDT --=-=-= 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 * 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". --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=fontsize.diff 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 --=-=-=-- ------------=_1223057703-28984-1--