From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Pango-like font fallback (was Re: Russian numero sign) Date: Thu, 23 Feb 2006 22:37:54 +0200 Message-ID: <200602232237.54975.pogonyshev@gmx.net> References: <200602191431.36541.pogonyshev@gmx.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1140832724 21304 80.91.229.2 (25 Feb 2006 01:58:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Feb 2006 01:58:44 +0000 (UTC) Cc: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 25 02:58:42 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FCohj-00029w-4U for ged-emacs-devel@m.gmane.org; Sat, 25 Feb 2006 02:58:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FCohj-0006JQ-R1 for ged-emacs-devel@m.gmane.org; Fri, 24 Feb 2006 20:58:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FCVjr-0003bH-6y for emacs-devel@gnu.org; Fri, 24 Feb 2006 00:43:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FCQkJ-0001j9-9k for emacs-devel@gnu.org; Thu, 23 Feb 2006 19:23:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FCNFm-0000pB-Qv for emacs-devel@gnu.org; Thu, 23 Feb 2006 15:39:59 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FCNMY-0003sM-VV for emacs-devel@gnu.org; Thu, 23 Feb 2006 15:46:59 -0500 Original-Received: (qmail invoked by alias); 23 Feb 2006 20:39:55 -0000 Original-Received: from unknown (EHLO [194.158.218.89]) [194.158.218.89] by mail.gmx.net (mp037) with SMTP; 23 Feb 2006 21:39:55 +0100 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Y-GMX-Trusted: 0 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:50918 Archived-At: Kenichi Handa wrote: > In article <200602191431.36541.pogonyshev@gmx.net>, Paul Pogonyshev writes: >=20 > > character: =EF=BF=BD (3696, #o7160, #xe70) > > charset: cyrillic-iso8859-5 (Right-Hand Part of Latin/Cyrillic Alph= abet (ISO/IEC 8859-5): ISO-IR-144.) > > code point: #x70 > > syntax: . which means: punctuation > > category: y:Cyrillic > > to input: type "#" with russian-computer > > buffer code: #x8C #xF0 > > file code: not encodable by coding system mule-utf-8-unix > > display: by this font (glyph code) > > -ETL-fixed-medium-r-normal--16-160-72-72-C-80-ISO8859-5 (#xF0) >=20 > This is very strange. >=20 > Benjamin Riefenstahl writes: > [...] > > Alternatively use unify-8859-on-encoding-mode, than cyrillic-iso8859-5 > > is preserved during input, but still can be saved as UTF-8. >=20 > But, unify-8859-on-encoding-mode should be on by default (at > least with CVS HEAD emacs). >=20 > Paul, do you turn it off intentionally? Can you reproduce > this problem by starting your emacs with "-Q"? Uh, indeed. I think I turned it off because of poor support of Cyrillic characters by the fonts... If I start it with `-Q', the numero sign is automatically encodable in UTF-8 as it should be, but the Cyrillic characters appear as boxes which is of course even worse for me. I wonder if Emacs could implement some smart font substitution when a glyph is not available in a font. You can see what I mean in e.g. recent `gnome-character-map' (it actually seems to be a very nice trait of all GTK+/Pango programs.) My `standard' desktop font is Bitstream Vera Sans and all common characters are displayed in this font in GNOME Character Map. However, certain characters are displayed in other fonts, presumably because glyphs for them are missed from Bitstream Vera Sans. Now, if I create a string of symbols in the Character Map and copy it into another program, I get these results: * GTK+ (hence Pango) programs: symbols that are displayed OK in the Map are displayed OK here too. * KDE/Qt programs: symbols that are displayed with the Bitstream font in the Character Map are displayed OK (my KDE is configured with Bitstream Vera Sans as default too), other symbols (drawn with different fonts in the Map) are shown as boxes. Apparently, Qt lacks font substitution just as Emacs. * Emacs is the worst, since it uses `adobe-courier'. So I think Pango fallback mechanism is great since many fonts are really poor wrt number of provided glyphs. It would be really nice if Emacs could use something symilar or even relay font/glyph-related tasks to Pango. Not in the upcoming release, of course, but I think it is one of the areas where improvement is certainly needed. Paul