From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: [drew.adams@oracle.com: RE: set-frame-font with no KEEP-SIZE arg doesn't resize the frame, so (frame-width) is incorrect] Date: Sun, 17 Oct 2004 17:37:47 +0100 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098031120 13032 80.91.229.6 (17 Oct 2004 16:38:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2004 16:38:40 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 17 18:38:36 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CJE3H-0006i4-00 for ; Sun, 17 Oct 2004 18:38:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJEAW-0004DQ-O0 for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2004 12:46:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CJEAM-0004Ai-GI for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:45:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CJEAL-000495-2s for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:45:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJEAK-00048S-OY for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:45:52 -0400 Original-Received: from [194.106.33.237] (helo=outmail.freedom2surf.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CJE2j-0008Ha-P8 for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:38:02 -0400 Original-Received: from wanchan.jasonrumney.net (i-195-137-77-250.freedom2surf.net [195.137.77.250]) by outmail.freedom2surf.net (8.12.10/8.12.10) with ESMTP id i9HGc0nF021272; Sun, 17 Oct 2004 17:38:00 +0100 Original-Received: from TONKOTSU-RAMEN (tonkotsu-ramen.jasonrumney.net [10.0.0.28]) by wanchan.jasonrumney.net (Postfix) with ESMTP id 61C52DDD5B; Sun, 17 Oct 2004 17:38:00 +0100 (BST) Original-To: "Drew Adams" In-Reply-To: (Richard Stallman's message of "Sun, 17 Oct 2004 12:08:06 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28518 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28518 > I tried it with different fonts. Try any two fonts that differ only by size. > For example: > > (set-frame-font "-outline-Lucida > Console-normal-r-normal-normal-14-105-96-96-c-80-iso8859-1") > > (set-frame-font "-outline-Lucida > Console-normal-r-normal-normal-18-105-96-96-c-80-iso8859-1") You have only changed the pixel height of the font, without changing the height in points, or the width of the font. This makes Emacs try to accomodate your request as far as it can, so even though the closest matching font is wider, it uses the width you specified (80 in tenths of points) in frame width calculations. If you replace the other size specifiers with wildcards, the frame width changes as expected: (set-frame-font "-outline-Lucida Console-normal-r-normal-normal-18-*-96-96-c-*-iso8859-1")