From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: font-backend branch Date: Sun, 04 May 2008 09:05:12 +0900 Message-ID: References: <48190539.4010508@gnu.org> <481AFB40.1050205@gnu.org> <481B16BE.7010608@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1209859560 24436 80.91.229.12 (4 May 2008 00:06:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2008 00:06:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 04 02:06:34 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 1JsRkH-0003NY-Bs for ged-emacs-devel@m.gmane.org; Sun, 04 May 2008 02:06:25 +0200 Original-Received: from localhost ([127.0.0.1]:57557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsRjZ-0000y9-U6 for ged-emacs-devel@m.gmane.org; Sat, 03 May 2008 20:05:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsRjW-0000y0-L2 for emacs-devel@gnu.org; Sat, 03 May 2008 20:05:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsRjV-0000xb-Os for emacs-devel@gnu.org; Sat, 03 May 2008 20:05:38 -0400 Original-Received: from [199.232.76.173] (port=33713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsRjV-0000xY-Kt for emacs-devel@gnu.org; Sat, 03 May 2008 20:05:37 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JsRjO-00062u-TC; Sat, 03 May 2008 20:05:31 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m4405I8L013397; Sun, 4 May 2008 09:05:18 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m4405Hgb010404; Sun, 4 May 2008 09:05:17 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id m4405CQh008868; Sun, 4 May 2008 09:05:12 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1JsRj6-0002Jp-Fj; Sun, 04 May 2008 09:05:12 +0900 In-reply-to: <481B16BE.7010608@gnu.org> (message from Jason Rumney on Fri, 02 May 2008 14:27:26 +0100) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:96400 Archived-At: In article <481B16BE.7010608@gnu.org>, Jason Rumney writes: > Is depending on the format of the font name returned by frame-parameter > widespread? I don't know, but I got at least one bug-report as attached. > XLFD has always been a poor fit for Windows fonts, and I am > reluctant to make a change like this that might cause users to beleive > that XLFD is still the prefered format for font names in Emacs. I understand your point. I want to suggest people to move their font handling code from font-name base to font-spec base (by using such functions as `font-spec', `font-get', `font-put', `copy-font-spec'). But, for that, we must at first change, for instance, the return value of (frame-parameter nil 'font) from string to font-object, and check how that change influence the other part. That't the future plan But, I think it itself is not that bad that a font-object has an XLFD name propperty. That is a different thing from what frame-parameter returns. --- Kenichi Handa handa@ni.aist.go.jp From: "Drew Adams" To: Date: Fri, 11 Apr 2008 11:39:03 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Thread-Index: AcicA1CgIP8qo0HoS62ESsbiALonUA== Cc: Subject: 23.0.60; modify-frame-parameters in Emacs 23 for fonts > From: Stefan Monnier Sent: Friday, April 11, 2008 9:38 AM > > Send it to the bug-tracker, please, if it's not there yet. ---- From: Drew Adams Sent: Saturday, April 05, 2008 7:18 PM 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? In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-04-04 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping'