Subject: Re: bug#4547: a bug: emacs 23.1: very large font

From: Kenichi Handa <[email-masked]>
Date: Thu, 01 Oct 2009 10:26:04 +0900

In article <[email-masked]>, Daniel Novotny <[email-masked]> writes:

> the bug report implies that the problem here is that emacs is scaling the requested font size according to
> the display resolution reported by Xorg. These are accurate for the dimensions of the screen, but that
> doesn't mean emacs should use them to change the font sizes the user requested:
> see https://bugzilla.redhat.com/show_bug.cgi?id=517272#c3

That bug report says:

> eg, my laptop display reports xdpyinfo 
> 
>   dimensions:    1600x1200 pixels (304x228 millimeters)
>   resolution:    134x134 dots per inch
> 
> while my external monitor report
> 
>   dimensions:    1680x1050 pixels (514x321 millimeters)
>   resolution:    83x83 dots per inch
> 
> Now both of these are accurate for the dimensions of the screen, but that
> doesn't mean emacs should use them to change the font sizes the user requested
> 
> > For example, using my laptop display
> > 
> >  - Go to the menu 'Options -> Set Default Font'.
> >  - Select  'DejaVu Sans Mono, Book, 12pt'
> >  - In a buffer, move cursor over a letter, and type  'c-u c-x =', and it
> > displays
> > 
> >     xft:-unknown-DejaVu Sans-normal-normal-normal-*-22-*-*-*-*-0-iso10646-1
> > (#x50)
> 
> ie, so when user requested requested 12pt, and emacs instead gave them 22pt

At least, this bug report confuses point and pixelsize.  In
the above case, Emacs selected "22-pixelsize" font, not
"22-point" font.  And, on 134 DPI screen, 22-pixel is
12-point (3.4mm).  So, it should be the correct size the
user requested by saying "12pt".

If one wants a font of 12-pixelsize, do something like:

ESC : (set-default-font "dejavu sans mono:pixelsize=12") RET

---
Kenichi Handa
[email-masked]