From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: modify-frame-parameters in Emacs 23 for fonts Date: Sat, 5 Apr 2008 19:17:49 -0700 Message-ID: <000201c8978c$69739fe0$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207448279 1120 80.91.229.12 (6 Apr 2008 02:17:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Apr 2008 02:17:59 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 06 04:18:32 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JiKSl-0007sr-5h for ged-emacs-devel@m.gmane.org; Sun, 06 Apr 2008 04:18:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiKS8-0003a9-3D for ged-emacs-devel@m.gmane.org; Sat, 05 Apr 2008 22:17:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiKS4-0003Xh-5B for emacs-devel@gnu.org; Sat, 05 Apr 2008 22:17:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiKS2-0003Vh-QM for emacs-devel@gnu.org; Sat, 05 Apr 2008 22:17:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiKS2-0003VY-N6 for emacs-devel@gnu.org; Sat, 05 Apr 2008 22:17:46 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JiKS2-0008Mf-Ba for emacs-devel@gnu.org; Sat, 05 Apr 2008 22:17:46 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m362HhkO022617 for ; Sat, 5 Apr 2008 21:17:43 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m360qkFn021960 for ; Sat, 5 Apr 2008 20:17:43 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3640497161207448262; Sat, 05 Apr 2008 19:17:42 -0700 Original-Received: from dradamslap1 (/141.144.64.62) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 05 Apr 2008 19:17:42 -0700 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: AciXjGkUccqyuRqdSruVv1GJrJHlAA== X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94469 Archived-At: I'm using this: GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-04-04 on LENNART-69DE564. (frame-parameter nil 'font) -> "-*-Lucida Console-normal-r-*-*-14-*-96-96-c-*-iso8859-1" (modify-frame-parameters nil (list (cons 'font "-*-Lucida Console-normal-r-*-*-15-*-96-96-c-*-iso8859-1"))) (frame-parameter nil 'font) -> "-outline-lucida console-normal-roman-normal-mono-15-*-*-*-*-*-fontset-startup" What's that about? In Emacs 20, 21, and 22, the result is just the font I specified. I have code that zooms frames (font size). I change just the point size in the font spec, using `x-decompose-font-name' and `x-compose-font-name'. I check that the result is a legitimate font using `x-list-fonts'. If not, I increase or decrease the increment until I find the font that works with the closest size. [Yes, I know there are other ways to adjust font size, but I've found that this method is flexible for users and provides certain benefits.] My code no longer works without change, because after one call to `modify-frame-parameters' the font is no longer something recognized by `x-list-fonts'. I can comment out the part that iterates until it finds a size that works (recognized by `x-list-fonts'). That works, but I'm still curious about this. (Is there perhaps a bug in `x-list-fonts' or in `modify-frame-parameters'?) I couldn't find anything that helps me understand this in the manuals. I haven't tried to dig through any code. Can someone light my lantern about this? I looked in NEWS also, and saw something about a font backend (I didn't follow the threads here about that). But I couldn't find anything in the Elisp or Emacs manuals about "backend" or "back?end", except for version-control back ends. A NEWS entry also says this: "the configure option `--disable-font-backend' (also available as a run-time option)." But I can't find any such option (variable) with `backend' or `back-end' in its name (except for `vc-handled-backends'). I see, in both NEWS and in my frames, a parameter named `font-backend', but I have no idea what it is. For me, its value is (font-backend uniscribe gdi), FWIW. Finding the function `fontp' mentioned in NEWS (but not in the Elisp manual, alas), I also tried that in place of `x-list-fonts'. But it too does not indicate that "-outline-lucida console-normal-roman-normal-mono-15-*-*-*-*-*-fontset-startup" is a legitimate font. I see font terms in NEWS that I don't see explained in the manual: font-entity object, font-spec object, font property value. I also see functions mentioned, such as `font-font', that my Emacs does not recognize. Are they perhaps only for X? This whole area is a murky one, for me. Do others feel that this stuff is explained well enough - in either the manuals or NEWS? Am I the only dummy about this? Is this is a hidden subject for some secret club? ;-) If not, how about some explanation?