emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; wrong glyph widths of some Unicode codepoints


From: David De La Harpe Golden
Subject: Re: 23.0.60; wrong glyph widths of some Unicode codepoints
Date: Fri, 23 May 2008 17:47:29 +0100
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)

Kenichi Handa wrote:

> I agree.  It's possible to implement a code to prefer a font
> of the same metrics (e.g. ascent, descent, avgwidth) as the
> default one in font-selection.  But, for that, Emacs
> consumes more memory and time for font finding.  And even
> with that, people may prefer a different font.
> 

FWIW, it's precious monospaced alignment going wrong that makes me do
bad things like the below...

Here, for reference, is an evil way to *force* emacs to use one (1) font
at all times, rather than trying anything frightfully clever :-).

This way, the xft fontbackend only gets to choose from one font
in the first place.  Alignment tends to become perfect, but sometimes
(of course) glyphs may be missing, depending on your choice of font.


*** First, set emacs to use xft FontBackend only.

echo "Emacs.FontBackend: xft" | xrdb -merge
(and add it to your ~/.Xdefaults )

*** Then, make a directory and copy one font into it (might
*** still be a few .ttf files to cover different faces)

mkdir ~/.lonelyfont
cp /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono* ~/.lonelyfont/

*** make an alternate fontconfig cache dir.

mkdir ~/.lonelyfontconfig

*** Now, create a fontconfig file that we're going to use
*** to override the usual search paths.

place in ~/.lonelyfont.conf  (the only changes from a typical
~/.fonts.conf are the <dir> and <cachedir> entries - if you
don't include the rest, you'll probably lose your antialiasing and
subpixel rendering settings)


<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <dir>~/.lonelyfont</dir>
 <cachedir>~/.lonelyfontconfig</cachedir>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>


*** Now start emacs, using the FONTCONFIG_FILE environment variable

FONTCONFIG_FILE=~/.lonelyfont.conf emacs


*** Laugh maniacally.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]