From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: 23.0.60; wrong glyph widths of some Unicode codepoints Date: Fri, 23 May 2008 17:47:29 +0100 Message-ID: <4836F521.303@harpegolden.net> References: <8763t6r1tp.fsf@physik.rwth-aachen.de> <87zlqhv71h.fsf@physik.rwth-aachen.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211561275 4959 80.91.229.12 (23 May 2008 16:47:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 May 2008 16:47:55 +0000 (UTC) Cc: emacs-devel@gnu.org, Torsten Bronger To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 23 18:48:32 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JzaRS-0007uu-GN for ged-emacs-devel@m.gmane.org; Fri, 23 May 2008 18:48:30 +0200 Original-Received: from localhost ([127.0.0.1]:36795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzaQh-0000WH-If for ged-emacs-devel@m.gmane.org; Fri, 23 May 2008 12:47:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzaQd-0000VU-RQ for emacs-devel@gnu.org; Fri, 23 May 2008 12:47:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzaQa-0000Th-TJ for emacs-devel@gnu.org; Fri, 23 May 2008 12:47:39 -0400 Original-Received: from [199.232.76.173] (port=56121 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzaQa-0000Td-Qr for emacs-devel@gnu.org; Fri, 23 May 2008 12:47:36 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:60509) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JzaQa-0004Ed-Gq for emacs-devel@gnu.org; Fri, 23 May 2008 12:47:36 -0400 Original-Received: from golden1.harpegolden.net (unknown [86.45.14.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTP id A112283F0; Fri, 23 May 2008 16:47:30 +0000 (UTC) User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110) In-Reply-To: X-Enigmail-Version: 0.95.0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97599 Archived-At: 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 and entries - if you don't include the rest, you'll probably lose your antialiasing and subpixel rendering settings) ~/.lonelyfont ~/.lonelyfontconfig rgb true hintfull true *** Now start emacs, using the FONTCONFIG_FILE environment variable FONTCONFIG_FILE=~/.lonelyfont.conf emacs *** Laugh maniacally.