unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org, Torsten Bronger <bronger@physik.rwth-aachen.de>
Subject: Re: 23.0.60; wrong glyph widths of some Unicode codepoints
Date: Fri, 23 May 2008 17:47:29 +0100	[thread overview]
Message-ID: <4836F521.303@harpegolden.net> (raw)
In-Reply-To: <E1JzS81-0002G6-Rv@etlken.m17n.org>

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.






      parent reply	other threads:[~2008-05-23 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22 11:54 23.0.60; wrong glyph widths of some Unicode codepoints Torsten Bronger
2008-05-23  6:46 ` Kenichi Handa
2008-05-23  7:00   ` Torsten Bronger
2008-05-23  7:55     ` Kenichi Handa
2008-05-23  8:57       ` David Hansen
2008-05-23 12:25         ` Kenichi Handa
2008-05-23 12:51           ` Jason Rumney
2008-05-23 16:47       ` David De La Harpe Golden [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4836F521.303@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=bronger@physik.rwth-aachen.de \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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).