unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* configuring fontsets on Emacs+Xft (CVS)
@ 2007-06-17 19:30 David Madore
  2007-06-17 20:53 ` Peter Dyballa
  2007-06-17 21:54 ` Taylor Venable
  0 siblings, 2 replies; 3+ messages in thread
From: David Madore @ 2007-06-17 19:30 UTC (permalink / raw)
  To: help-gnu-emacs

Hi.

Is there a wizard around who understands how to configure fonts
properly using the Xft-enabled (GNU) Emacs?  (I refer to <URL:
http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs >, and specifically
to a today's checkout of the emacs-unicode-2 branch: I hope this is
indeed the most sensible thing to take if I want an Emacs with
antialiased fonts in (its own) X11 Window.  I realize that this is
work under development, but there does not seem to be any better way,
is there?)

Having compiled with --enable-font-backend --with-xft, I now open a
utf-8 file with emacs --font="FreeMono-16" (the FreeMono font contains
all the Latin, polytonic Greek, Cyrillic and Hebrew characters I need,
plus a good many others).  Latin characters are correctly displayed,
but for some reason Emacs insists on getting its cyrillic characters
from some very ugly bitmap font: here's what C-u C-x = says on what is
supposedly a CYRILLIC SMALL LETTER A:

        character: # (1072, #o2060, #x430)
preferred charset: iso-8859-5 (ISO/IEC 8859/5)
       code point: 0xD0
           syntax: w 	which means: word
         category: Y:Cyrillic characters of 2-byte character sets c:Chinese
		   h:Korean j:Japanese y:Cyrillic
      buffer code: #xD0 #xB0
        file code: #xD0 #xB0 (encoded by coding system utf-8-unix)
          display: by this font (glyph code)
     -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO8859-5 (#xD0)

Well I *do not* want it to use
-Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO8859-5, I want it
to use FreeMono-16 as it does for, say, a LATIN SMALL LETTER A:

        character: a (97, #o141, #x61)
preferred charset: ascii (ASCII (ISO646 IRV))
       code point: 0x61
           syntax: w 	which means: word
         category: a:ASCII graphic characters 32-126 (ISO646 IRV:1983[4/0])
		   l:Latin r:Japanese roman
      buffer code: #x61
        file code: not encodable by coding system utf-8-unix
          display: by this font (glyph code)
     freemono:pixelsize=18:foundry=unknown:weight=medium:slant=r:width=normal (#x44)

How can I force Emacs to use FreeMono on every character that FreeMono
can display rather than use an iso-8859-5 font because it thinks that
this character is encodable in iso-8859-5 (I really don't care: I
intend to use Unicode all the way).

Thanks for you help!

-- 
     David A. Madore
    (david.madore@ens.fr,
     http://www.madore.org/~david/ )

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

* Re: configuring fontsets on Emacs+Xft (CVS)
  2007-06-17 19:30 configuring fontsets on Emacs+Xft (CVS) David Madore
@ 2007-06-17 20:53 ` Peter Dyballa
  2007-06-17 21:54 ` Taylor Venable
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2007-06-17 20:53 UTC (permalink / raw)
  To: David Madore; +Cc: help-gnu-emacs


Am 17.06.2007 um 21:30 schrieb David Madore:

> Is there a wizard around who understands how to configure fonts
> properly using the Xft-enabled (GNU) Emacs?

A documentation on that would be very nice, indeed! (Actually, I  
think, libXft draws a lot of information from the font configuration  
files used. So it might be necessary to concentrate on this topic to  
solve the GNU Emacs problem ...)

--
Greetings

   Pete

Well done is better than well said.
                            -- Benjamin Franklin

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

* Re: configuring fontsets on Emacs+Xft (CVS)
  2007-06-17 19:30 configuring fontsets on Emacs+Xft (CVS) David Madore
  2007-06-17 20:53 ` Peter Dyballa
@ 2007-06-17 21:54 ` Taylor Venable
  1 sibling, 0 replies; 3+ messages in thread
From: Taylor Venable @ 2007-06-17 21:54 UTC (permalink / raw)
  To: David Madore; +Cc: help-gnu-emacs

David Madore wrote:
> Is there a wizard around who understands how to configure fonts
> properly using the Xft-enabled (GNU) Emacs?  (I refer to <URL:
> http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs >, and specifically
> to a today's checkout of the emacs-unicode-2 branch: I hope this is
> indeed the most sensible thing to take if I want an Emacs with
> antialiased fonts in (its own) X11 Window.  I realize that this is
> work under development, but there does not seem to be any better way,
> is there?)

I'm hardly a wizard at such things, but I have run into the same 
problem.  As far as I know, there is no other way to have anti-aliased 
fonts under X11 than to use the unicode-2 branch from CVS, so you're on 
the right track there.

> Having compiled with --enable-font-backend --with-xft, I now open a
> utf-8 file with emacs --font="FreeMono-16" (the FreeMono font contains
> all the Latin, polytonic Greek, Cyrillic and Hebrew characters I need,
> plus a good many others).  Latin characters are correctly displayed,
> but for some reason Emacs insists on getting its cyrillic characters
> from some very ugly bitmap font

I had the same issue with Greek characters using the DejaVu Sans Mono 
font.  I'm guessing the solution is the same, so here's what I did:

(set-fontset-font
   (frame-parameter nil 'font)
   'unicode
   "DejaVu Sans Mono")

If I remember correctly, this tells Emacs to use DejaVu Sans Mono as the 
font for all members of the Unicode character set.  For this to work, 
you may need to make sure your buffer encoding is set to Unicode.

Unfortunately, this is about the one place where Emacs really fails for 
me.  It's a lot easier for me to enter Unicode characters in Vim than in 
Emacs, and it looks prettier too.  Let's hope it gets better.

Best regards.

-- 
Taylor Venable
taylor@metasyntax.net
http://www.metasyntax.net/

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

end of thread, other threads:[~2007-06-17 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-17 19:30 configuring fontsets on Emacs+Xft (CVS) David Madore
2007-06-17 20:53 ` Peter Dyballa
2007-06-17 21:54 ` Taylor Venable

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).