From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: alkibiades@gmx.de (Oliver Scholz) Newsgroups: gmane.emacs.help Subject: Re: how to get a font's point size? Date: 23 Apr 2004 02:25:03 -0700 Organization: http://groups.google.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <52a143dc.0404230125.4a871102@posting.google.com> References: <40744C5F.6010905@yahoo.com> NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1082712720 19702 80.91.224.253 (23 Apr 2004 09:32:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Apr 2004 09:32:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 23 11:31:54 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BGx2I-00068U-00 for ; Fri, 23 Apr 2004 11:31:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BGx1c-0008A6-74 for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Apr 2004 05:31:12 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!news.ks.uiuc.edu!news.glorb.com!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: 145.254.135.45 Original-X-Trace: posting.google.com 1082712303 18332 127.0.0.1 (23 Apr 2004 09:25:03 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 23 Apr 2004 09:25:03 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:122615 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17903 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17903 Kevin Rodgers wrote in message news:<40744C5F.6010905@yahoo.com>... > What is the right way to get the point size from a font name pattern, > e.g. "-*-courier-medium-r-*--*-120-*-*-*-*-iso8859-1"? > > What is the right way to get the point size from a font name, e.g. > "-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1"? > > x-font-regexp doesn't match the asterisks in the pattern, and even > though it does match the resolved name it doesn't group the point size > field so it can be extracted with match-string. Well, if this is just about parsing the XFLD string, maybe you could use something like: (aref (x-decompose-font-name "-*-courier-medium-r-*--*-120-*-*-*-*-iso8859-1") 7)