From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: char-displayable-p issue Date: Tue, 21 Oct 2003 16:22:40 -0700 (PDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20031021232240.14826.qmail@web60306.mail.yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0954427674==" X-Trace: sea.gmane.org 1066778879 27108 80.91.224.253 (21 Oct 2003 23:27:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2003 23:27:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Oct 22 01:27:57 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AC5uv-0002z6-00 for ; Wed, 22 Oct 2003 01:27:57 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AC5uv-0007fu-00 for ; Wed, 22 Oct 2003 01:27:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AC5uB-0000Sv-BF for emacs-devel@quimby.gnus.org; Tue, 21 Oct 2003 19:27:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AC5qO-0007Ep-8l for emacs-devel@gnu.org; Tue, 21 Oct 2003 19:23:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AC5pr-0006jF-Bf for emacs-devel@gnu.org; Tue, 21 Oct 2003 19:23:14 -0400 Original-Received: from [216.109.118.117] (helo=web60306.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.24) id 1AC5pp-0006em-D0 for emacs-devel@gnu.org; Tue, 21 Oct 2003 19:22:41 -0400 Original-Received: from [12.91.4.163] by web60306.mail.yahoo.com via HTTP; Tue, 21 Oct 2003 16:22:40 PDT Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17311 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17311 --===============0954427674== Content-Type: multipart/alternative; boundary="0-64714049-1066778560=:13458" --0-64714049-1066778560=:13458 Content-Type: text/plain; charset=us-ascii I can't reproduce that bug. When I turned on ruler-mode, I see both characters in the ruler head. Isn't it a bug specific to Windows? Yes, it seems the problem is specific to Windows. Work well on my GNU/Linux box. I'm not sure that this is just a Windows issue -- it may affect some X implementations as well. The problem seems to be that the wildcard pattern generated in `char-displayable-p' is not matching multiple hyphen separated portions of the font name. That is, '-*-*-iso8859-1' doesn't match any fonts while '-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-1' does. Here's a patch that corrects the problem (and should work reliably on all X implementations) but which runs very slowly on Windows. Please review... Index: emacs/lisp/international/mule-util.el===================================================================RCS file: /cvsroot/emacs/emacs/lisp/international/mule-util.el,vretrieving revision 1.53diff -b -u -r1.53 mule-util.el--- emacs/lisp/international/mule-util.el 1 Sep 2003 18:45:35 -00001.53+++ emacs/lisp/international/mule-util.el 21 Oct 2003 22:47:42 -0000@@ -386,7 +386,7 @@ (or (stringp font-pattern) (setq font-pattern (concat "-" (or (car font-pattern) "*")- "-*-"+ "-*-*-*-*-*-*-*-*-*-*-*-" (cdr font-pattern)))) (x-list-fonts font-pattern 'default (selected-frame) 1))))) (t -- Michael --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-64714049-1066778560=:13458 Content-Type: text/html; charset=us-ascii
I can't reproduce that bug. When I turned on ruler-mode, I see both characters in the ruler head. Isn't it a bug specific to Windows?
Yes, it seems the problem is specific to Windows. Work well on my GNU/Linux box.

I'm not sure that this is just a Windows issue -- it may affect some X implementations as well.  The problem seems to be that the wildcard pattern generated in `char-displayable-p' is not matching multiple hyphen separated portions of the font name.  That is, '-*-*-iso8859-1' doesn't match any fonts while '-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-1' does.

Here's a patch that corrects the problem (and should work reliably on all X implementations) but which runs very slowly on Windows. 

Please review...

Index: emacs/lisp/international/mule-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-util.el,v
retrieving revision 1.53
diff -b -u -r1.53 mule-util.el
--- emacs/lisp/international/mule-util.el       1 Sep 2003 18:45:35 -00001.53
+++ emacs/lisp/international/mule-util.el       21 Oct 2003 22:47:42 -0000
@@ -386,7 +386,7 @@
                 (or (stringp font-pattern)
                     (setq font-pattern (concat "-"
                                                (or (car font-pattern) "*")
-                                               "-*-"
+                                               "-*-*-*-*-*-*-*-*-*-*-*-"
                                                (cdr font-pattern))))
                 (x-list-fonts font-pattern 'default (selected-frame) 1)))))
        (t

-- Michael


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-64714049-1066778560=:13458-- --===============0954427674== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --===============0954427674==--