From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Font selection weirdness Date: Mon, 26 May 2008 13:36:41 +0100 Message-ID: <483AAED9.20309@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1211805471 22792 80.91.229.12 (26 May 2008 12:37:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 May 2008 12:37:51 +0000 (UTC) Cc: Emacs Devel To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 26 14:38:31 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 1K0by5-0005T0-8p for ged-emacs-devel@m.gmane.org; Mon, 26 May 2008 14:38:25 +0200 Original-Received: from localhost ([127.0.0.1]:47204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0bxK-00033D-9s for ged-emacs-devel@m.gmane.org; Mon, 26 May 2008 08:37:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0bwV-0002dS-2y for emacs-devel@gnu.org; Mon, 26 May 2008 08:36:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0bwT-0002cf-Kk for emacs-devel@gnu.org; Mon, 26 May 2008 08:36:46 -0400 Original-Received: from [199.232.76.173] (port=40010 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0bwT-0002cX-A3 for emacs-devel@gnu.org; Mon, 26 May 2008 08:36:45 -0400 Original-Received: from mk-outboundfilter-5-a-2.mail.uk.tiscali.com ([212.74.114.4]:58184) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K0bwS-0003v7-U9 for emacs-devel@gnu.org; Mon, 26 May 2008 08:36:45 -0400 Original-X-Trace: 33884047/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$ACCEPTED/freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AngFAFNLOkhTQxds/2dsb2JhbACBVapH X-IronPort-AV: E=Sophos;i="4.27,542,1204502400"; d="scan'208";a="33884047" X-IP-Direction: IN Original-Received: from i-83-67-23-108.freedom2surf.net (HELO wanchan.jasonrumney.net) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP; 26 May 2008 13:36:43 +0100 Original-Received: from [192.168.249.27] (chiko.jasonrumney.net [192.168.249.27]) by wanchan.jasonrumney.net (Postfix) with ESMTP id 127FF42E; Mon, 26 May 2008 13:36:43 +0100 (BST) User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: X-Enigmail-Version: 0.95.6 OpenPGP: id=8086879D X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:97718 Archived-At: Juanma Barranquero wrote: > -------------------------------------------------------------------------------- > character: ế (7871, #o17277, #x1ebf) > preferred charset: unicode (Unicode (ISO10646)) > code point: 0x1EBF > syntax: w which means: word > category: l:Latin v:Vietnamese > buffer code: #xE1 #xBA #xBF > file code: ESC #x2C #x31 #x2A (encoded by coding system > iso-2022-7bit-dos) > display: by this font (glyph code) > -outline-DejaVu Sans > Mono-normal-normal-normal-mono-13-*-*-*-m-*-iso8859-5 (#x03) > The choice of iso8859-5 is strange, but it doesn't actually matter on Windows, as all truetype fonts are treated as Unicode, and the different character sets reported as supported for a font are only to assist the font matching in finding the right fonts. It may just be that this font was first opened when displaying a Cyrillic character, so subsequent uses reflect that. Character at glyph index 3 in most fonts is space, which is consistent with what you see, but it is strange that DejaVu Sans Mono maps this character to that and not glyph index 0 (.notdef) if it doesn't have a glyph for it. > If I type these characters in *scratch*, via ucs-insert, three of them > are displayed correctly (U+2208, U+2022 and U+25A1), and the other > three appear as empty boxes (though Emacs still thinks it has a font > for them). > > character: ∀ (8704, #o21000, #x2200) > preferred charset: unicode (Unicode (ISO10646)) > code point: 0x2200 > syntax: . which means: punctuation > category: h:Korean j:Japanese > buffer code: #xE2 #x88 #x80 > file code: #xE2 #x88 #x80 (encoded by coding system utf-8-unix) > display: by this font (glyph code) > -outline-DejaVu Sans Mono-normal-normal-normal-mono-13-*-*-*-m-*-iso10646-1 (#x2200) > Now the same font is being used (but with a iso10646-1 charset, so probably a different font_object pointing to the same font). But this time, it seems unicode code points are being used instead of glyph index, which indicates that an error has been returned by GetCharacterPlacementW or GetGlyphOutlineW. To see why the error is occuring, set a breakpoint on clear_cached_metrics and when it is hit, go back up the stack (in gdb: frame 1) to see what function it has failed from. Then get information such as the return code of the failing function, the character or glyph code that it is failing on, and the font, tyo help diagnose why it has failed.