all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using Emacs 22 Courier font in Emacs 23?
@ 2009-08-14 19:12 Nicolas
  2009-08-15  8:53 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Nicolas @ 2009-08-14 19:12 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,
I just switched to Emacs 23, but I have a problem finding a font that 
suits my needs.

I used Courier 12pt with Emacs 22. The letters had a size of 10x15 
pixels on my screen.
The True Type monospaced fonts on my computer (for example Liberation 
Mono) have a size of 8x17 pixels in 12pt, which means that I can display 
less lines on my screen. If I reduce the font size, the letters are too 
narrow.

Do you know where I can find the Emacs 22 Courier font (or any other 
monospaced font with the same size) as a True Type font?

Thank you very much for your advices.
Nicolas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-14 19:12 Using Emacs 22 Courier font in Emacs 23? Nicolas
@ 2009-08-15  8:53 ` Peter Dyballa
       [not found] ` <mailman.4617.1250326430.2239.help-gnu-emacs@gnu.org>
  2009-08-15 14:15 ` Joost Kremers
  2 siblings, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2009-08-15  8:53 UTC (permalink / raw)
  To: emacs-help gnu


Am 14.08.2009 um 21:12 schrieb Nicolas:

> Do you know where I can find the Emacs 22 Courier font (or any  
> other monospaced font with the same size) as a True Type font?


You could try the TeX Gyre fonts from TeX distributions, also  
available on CTAN. It's the enhanced clone of an urw++ Courier clone.  
OTF and maybe also TTF.

Another option is Lucida Sans Typewriter from Java. TTF.

--
Greetings

   Pete

Indentation?! I will show you how to indent when I indent your skull!





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
       [not found] ` <mailman.4617.1250326430.2239.help-gnu-emacs@gnu.org>
@ 2009-08-15 14:08   ` Nicolas
  2009-08-15 17:39     ` Peter Dyballa
       [not found]     ` <mailman.4637.1250357969.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas @ 2009-08-15 14:08 UTC (permalink / raw)
  To: help-gnu-emacs

Thank you very much for your answer.

> You could try the TeX Gyre fonts from TeX distributions, also available 
> on CTAN. It's the enhanced clone of an urw++ Courier clone. OTF and 
> maybe also TTF.
> Another option is Lucida Sans Typewriter from Java. TTF.

I tried the Tex Gyre Cursor and the Lucida Sans Typewriter fonts, but I 
still have the same problem: the characters themselves have the correct 
size (same as in Emacs 22), but there is too much white around them, 
which doesn't give them the correct aspect ratio.

This has nothing to do with the line-spacing parameter of Emacs, which 
is already set to 0.

Any idea?
Thanks,
Nicolas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-14 19:12 Using Emacs 22 Courier font in Emacs 23? Nicolas
  2009-08-15  8:53 ` Peter Dyballa
       [not found] ` <mailman.4617.1250326430.2239.help-gnu-emacs@gnu.org>
@ 2009-08-15 14:15 ` Joost Kremers
  2009-08-15 14:27   ` Nicolas
  2 siblings, 1 reply; 12+ messages in thread
From: Joost Kremers @ 2009-08-15 14:15 UTC (permalink / raw)
  To: help-gnu-emacs

Nicolas wrote:
> Do you know where I can find the Emacs 22 Courier font (or any other 
> monospaced font with the same size) as a True Type font?

i use Dejavu Sans Mono, which i find very pleasant.


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-15 14:15 ` Joost Kremers
@ 2009-08-15 14:27   ` Nicolas
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas @ 2009-08-15 14:27 UTC (permalink / raw)
  To: help-gnu-emacs

> i use Dejavu Sans Mono, which i find very pleasant.

In 12 pt, Dejavu Sans Mono characters have exactly the same width as 
Emacs 22 Courier characters, but they are far higher. And my problem is 
that I would like to display as many lines on my screen with Emacs 23 as 
I did with Emacs 22. (Reducing the font size is not a solution, because 
the characters become too narrow and hard to read).

Nicolas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-15 14:08   ` Nicolas
@ 2009-08-15 17:39     ` Peter Dyballa
       [not found]     ` <mailman.4637.1250357969.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2009-08-15 17:39 UTC (permalink / raw)
  To: Nicolas; +Cc: help-gnu-emacs


Am 15.08.2009 um 16:08 schrieb Nicolas:

> Any idea?

Maybe it has to do with the way GNU Emacs receives the fonts. In X11  
you have two options: either (X11) server side or (libfontconfig)  
client side. This can make, no: this does regularly make a  
difference! I don't these between the two Emacsen (I can use GNU  
Emacs 21.3.50, i.e. pre-22.x, 22.x, and many 23.0.x and 23.1.50, the  
latter ones all from CVS), because I am using fontsets and I am  
using ]initial|default}-frame-alist:

	(setq initial-frame-alist
		...
	       '(font . "fontset-10pt_lucida_sans_typewriter")
		...)

This fontset is defined as this:

     (create-fontset-from-fontset-spec "-b&h-lucidatypewriter-medium- 
r-*-*-10-*-*-*-*-*-fontset-10pt_lucida_sans_typewriter" t 'noerror)
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-1   
'("lucidatypewriter" . "iso8859-1"))
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-2   
'("lucidatypewriter" . "iso8859-2"))         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-3   
'("lucidatypewriter" . "iso8859-3"))
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-4   
'("lucidatypewriter" . "iso8859-4"))
         (set-fontset-font "fontset-10pt_lucida_sans_typewriter"     
'cyrillic-iso8859-5  '("lucidatypewriter" . "iso8859-5"))
         (set-fontset-font "fontset-10pt_lucida_sans_typewriter"       
'hebrew-iso8859-8  '("lucidatypewriter" . "iso8859-8"))
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-9   
'("lucidatypewriter" . "iso8859-9"))
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-14  
'("lucidatypewriter" . "iso8859-14"))
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"       'latin-iso8859-15  
'("lucidatypewriter" . "iso8859-15"))
         (set-fontset-font  
"fontset-10pt_lucida_sans_typewriter"            'thai-tis620  
'("lucidatypewriter" . "iso10646-1"))
;       (set-fontset-font "fontset-10pt_lucida_sans_typewriter"    
'georgian-ps '("bpg glaho arial" . "iso10646-1"))
         (set-fontset-font "fontset-10pt_lucida_sans_typewriter"  
'mule-unicode-0100-24ff '("code2000" . "iso10646-1"))        (set- 
fontset-font "fontset-10pt_lucida_sans_typewriter" 'mule- 
unicode-2500-33ff '("code2000" . "iso10646-1"))
         (set-fontset-font "fontset-10pt_lucida_sans_typewriter"  
'mule-unicode-e000-ffff '("code2000" . "iso10646-1"))

You see that I am using (most probably) X11. But I can be wrong here.  
Trying to use libfontconfig seems to fail, most probably because on  
my old Mac OS X system the wrong libraries of libfontconfig are used  
(it's compilation issue I should solve in the next few years, or  
months).


Can you make tests with X11 and libfontconfig font names? Can you  
also make tests with using the above mentioned *-frame-alist's?  
(Initial is the first frame, default is every other new one.)

--
Greetings

   Pete

Make it simple, as simple as possible but no simpler.
				– Albert Einstein







^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
       [not found]     ` <mailman.4637.1250357969.2239.help-gnu-emacs@gnu.org>
@ 2009-08-16  8:58       ` Nicolas
  2009-08-16  9:57         ` Peter Dyballa
       [not found]         ` <mailman.4716.1250416669.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas @ 2009-08-16  8:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I found the mule-diag command, which helped me identify the name of the 
font I was using under Emacs 22. It is 
-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1. I then 
tried the command emacs23 -fn 
-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1, and it 
worked!

I then located the font file (called n022003l.pfb on my Debian system), 
converted it to True Type using FontForge, and loaded it as a True Type 
font in Emacs: the characters themselves had exactly the same size, but 
the vertical approaches were bigger (slightly bigger below, and lots 
bigger above the character).

It is as if Emacs 22 would crop the approaches, while it is not the case 
with True Type fonts.

It would be great to be able to have such cropping with True Type fonts.

Nicolas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-16  8:58       ` Nicolas
@ 2009-08-16  9:57         ` Peter Dyballa
       [not found]         ` <mailman.4716.1250416669.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2009-08-16  9:57 UTC (permalink / raw)
  To: Nicolas; +Cc: help-gnu-emacs


Am 16.08.2009 um 10:58 schrieb Nicolas:

> I then located the font file (called n022003l.pfb on my Debian system)

It is one of the urw++ clones, donated to Ghostscript (and also used  
in TeX).

>
> It is as if Emacs 22 would crop the approaches, while it is not the  
> case with True Type fonts.

Try to adjust the font in FontForge. And: which font system is  
delivering the font? How do you distinguish between the PostScript  
and the TrueType version?

--
Greetings

   Pete

I wouldn't recommend sex, drugs or insanity for everyone, but they've  
always worked for me.
				– Hunter S. Thompson







^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
       [not found]         ` <mailman.4716.1250416669.2239.help-gnu-emacs@gnu.org>
@ 2009-08-16 10:45           ` Nicolas
  2009-08-16 12:44             ` Peter Dyballa
       [not found]             ` <mailman.4722.1250426668.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas @ 2009-08-16 10:45 UTC (permalink / raw)
  To: help-gnu-emacs

> Try to adjust the font in FontForge.

That's probably what I will do if I have no other choice, but I would 
prefer a smarter solution.
Moreover, I'm sure that I'm not the only person interested in displaying 
more lines in Emacs 23 while maintaining readability.

> And: which font system is delivering the font?

It's fontconfig.

> How do you distinguish between the PostScript and the TrueType version?

I renamed the TrueType version.


Nicolas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-16 10:45           ` Nicolas
@ 2009-08-16 12:44             ` Peter Dyballa
       [not found]             ` <mailman.4722.1250426668.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2009-08-16 12:44 UTC (permalink / raw)
  To: Nicolas; +Cc: help-gnu-emacs


Am 16.08.2009 um 12:45 schrieb Nicolas:

>> How do you distinguish between the PostScript and the TrueType  
>> version?
>
> I renamed the TrueType version.

Do you mean the file name or the font name, font family name, etc.?


My general impression is that libfontconfig delivers wrong values for  
the height of character cells. Though I never tried a proof for my  
opinion...

--
Greetings

   Pete

One-Shot Case Study, n.:
	The scientific equivalent of the four-leaf clover, from
	which it is concluded all clovers possess four leaves
	and are sometimes green.








^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
       [not found]             ` <mailman.4722.1250426668.2239.help-gnu-emacs@gnu.org>
@ 2009-08-16 13:55               ` Nicolas
  2009-08-16 15:29                 ` Peter Dyballa
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas @ 2009-08-16 13:55 UTC (permalink / raw)
  To: help-gnu-emacs

> Do you mean the file name or the font name, font family name, etc.?

Yes, everything. I used the font info dialog of fontforge.

> My general impression is that libfontconfig delivers wrong values for 
> the height of character cells. Though I never tried a proof for my 
> opinion...

I don't think the problem is in libfontconfig: when I open the font in 
fontforge the glyph size has exactly the same aspect ratio as in Emacs 
23 (with a TrueType font).

Do you know of any "auto-cropping" feature with the PostScript fonts?


Thanks again for your help, Peter.
Nicolas


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Using Emacs 22 Courier font in Emacs 23?
  2009-08-16 13:55               ` Nicolas
@ 2009-08-16 15:29                 ` Peter Dyballa
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Dyballa @ 2009-08-16 15:29 UTC (permalink / raw)
  To: Nicolas; +Cc: help-gnu-emacs


Am 16.08.2009 um 15:55 schrieb Nicolas:

> I don't think the problem is in libfontconfig: when I open the font  
> in fontforge the glyph size has exactly the same aspect ratio as in  
> Emacs 23 (with a TrueType font).


Glyph size and aspect ratio are uncorrelated things – a small TV set  
can have an aspect ratio of 16:9 and large screen can have an aspect  
ration of 4:3.

You can also use some text programme to set text in your font(s), PS  
and TT variants. Both fonts can be in fontconfig and in X11. Or you  
use one of the PS examples from Ghostscript and make it use any of  
these fonts. From the PS font you can gain the AFM data (font  
metrics), there is ttf2afm to gain the same data from TTF. FontForge  
also can display such metrics.


Libfontconfig can deliver much more details from a TT or OT font.  
Such a font can have additional data to insert space between lines.  
Ten years ago the X server (or window manager?) could be told to  
insert some or some more space between lines to serve ergonometric  
reasons. In OpenWindows on Sun Solaris GNU Emacs could follow these...

--
Greetings

   Pete      <\
              _\     O  _
             |o \  _\\_/-\='
_____________(_)|-(_)  (_)___________________________________







^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-08-16 15:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14 19:12 Using Emacs 22 Courier font in Emacs 23? Nicolas
2009-08-15  8:53 ` Peter Dyballa
     [not found] ` <mailman.4617.1250326430.2239.help-gnu-emacs@gnu.org>
2009-08-15 14:08   ` Nicolas
2009-08-15 17:39     ` Peter Dyballa
     [not found]     ` <mailman.4637.1250357969.2239.help-gnu-emacs@gnu.org>
2009-08-16  8:58       ` Nicolas
2009-08-16  9:57         ` Peter Dyballa
     [not found]         ` <mailman.4716.1250416669.2239.help-gnu-emacs@gnu.org>
2009-08-16 10:45           ` Nicolas
2009-08-16 12:44             ` Peter Dyballa
     [not found]             ` <mailman.4722.1250426668.2239.help-gnu-emacs@gnu.org>
2009-08-16 13:55               ` Nicolas
2009-08-16 15:29                 ` Peter Dyballa
2009-08-15 14:15 ` Joost Kremers
2009-08-15 14:27   ` Nicolas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.