From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: How can I determine what the default font it? Date: Sun, 29 Feb 2004 17:58:33 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <874qt94ybq.fsf@emptyhost.emptydomain.de> References: <87ptc2w09r.fld@barrow.com> <87ekshjqq9.fld@barrow.com> <878yiozp62.fsf@emptyhost.emptydomain.de> <87d68034c7.fld@barrow.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1078074194 21586 80.91.224.253 (29 Feb 2004 17:03:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Feb 2004 17:03:14 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 29 18:03:08 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 1AxULL-0003FL-00 for ; Sun, 29 Feb 2004 18:03:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AxUKM-00023q-Qe for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Feb 2004 12:02:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!213-203-244-156.kunde.vdserver.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 133 Original-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de (213.203.244.156) Original-X-Trace: news.uni-berlin.de 1078073903 56656937 I 213.203.244.156 ([73968] 10430) User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:/v3nPMCFsoY0mzeQvUupDfyyXJ4= Original-Xref: shelby.stanford.edu gnu.emacs.help:121372 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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:17326 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17326 floyd@barrow.com (Floyd L. Davidson) writes: > Kai Grossjohann wrote: >>floyd@barrow.com (Floyd L. Davidson) writes: >> >>> jasonr (Jason Rumney) @ f2s.com wrote: >>>>floyd@barrow.com (Floyd L. Davidson) writes: >>>> >>>>Then set your dpi correctly, so X can compensate. Since 21.1, Emacs >>>>default fonts are specified in point sizes rather than pixel sizes. >>> >>> Can you be less cryptic? > > Perhaps I was too cryptic too! Apparently :-) > I was asking about how it related to the article it referenced. > Neither you or Jason have helped the OP to configure his Emacs, > and I believe that was the intention of my article. Hm? Neither Jason nor I answered the OP's stated question. However, the *real* problem appeared to be that he couldn't read the font. And frobbing the dpi setting will choose a different font, which might be legible. >>Different monitors/displays show a pixel in different sizes. Pixel >>size is usually measured in pixels per inch, or dots per inch, aka >>DPI. > > DPI is screen resolution. It is a function of the X server's > configured scan rate (vertical in this case, though usually what > is referenced is only the horizontal) and the physical size of > the monitor's viewable screen. Maybe the word "screen resolution" comes with different definitions, depending on who's talking. When I hear "screen resolution", I think of values such as "1024x768". >>The X server has a configuration option (in /etc/X11/XF86Config, I >>believe) where you can tell it about the dpi of your monitor/display. > > Actually, you don't tell it "about" it, you flat force it to a > specific resolution by setting the scan rate (rather than DPI, > which is a derived value which also depends on the monitor size, > a characteristic that the X server does not know about and does > not care about, and hence is not part of the X configuration and > is only a number you might just happen to know, though it is > useless information for the most part). I apologize. It is true that you cannot specify the DPI in /etc/X11/XF86Config. But I also wasn't referring to the scan rate, either. I was referring to the "-dpi" switch for the (XFree86) X server. (I just misremembered things and thought it was configurable in XF86Config.) If you invoke the X server with "-dpi 100" and some X11 program wishes to use a 72pt (1 inch tall) font, then the X server will use 100 pixels for this. If you invoke the X server with "-dpi 200" instead, then the X server will use 200 pixels. So when the *same* program requests a font of the *same* size, the actually visible results will be different, depending on the value of "-dpi". So just invoking the X server with a different -dpi value can cause many applications to use larger (or smaller) fonts. That's a Good Thing, IMHO, since it does not require you to tweak each application individually. [time passes] Oh, now I see the DisplaySize parameter in "man XF86Config". > Jason can't seriously be suggesting that the answer to Emacs > font configuration is "Then set your dpi correctly"??? Surely > what he meant wasn't quite what he said. I didn't find this answer to be totally unreasonable. It was terse, but not unreasonable. But, of course, I can't mindread and thus I don't really know what he meant. >>Emacs used to specify font sizes in pixel, so regardless of what dpi >>you specified in X11, the standard font was N pixels tall. > > How does that relate to the article to which Jason was replying? > What that article listed was .Xdefault settings such as this: > > Emacs.default.attributeFont: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1 > > What would you suggest changing in that specification? Which, > incidentally, works quite well... as near as I can tell. Is > there some benefit to a different manner of specification? My suggestion was not to change that specification at all. Instead, invoke the X server with a different -dpi value. >>But now, Emacs specifies font sizes in point (1/72th of an inch), so >>the number of pixels of the default font size depends on the dpi >>setting. Let's say you specify a 12pt font, then that's 1/6 inches. >>If you have 6 dpi, then Emacs will choose 1 pixel to display it. If >>you have 60 dpi, then Emacs will choose 10 pixels to display it. >> >>This method works for many applications. > > How does that relate to the topic at hand? Please provide an > example demonstrating something other than what I've previously > posted that will work better. On my Debian system, /etc/X11/xinit/xserverrc looks like this: #!/bin/sh exec /usr/bin/X11/X -dpi 100 -nolisten tcp Start X11, start Emacs, look at it. Then change the 100 into 200, start X11 again, start Emacs, look at it. Can you observe the difference? > Otherwise, rather than describe well known characterstics of > point size, why don't we discuss the less known little objects > like em's and en's, which are also relative and can't be > measured in specific numbers of pt's. I think most font sizes are not specified in ems and ens. But many font sizes are specified in pts. This makes pts more relevant to the issue at hand than ems and ens. Kai