From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Why can't emacs recognize X fonts? Date: Sun, 20 Jun 2010 10:46:46 +0200 Message-ID: <424C6A04-3435-487C-9985-CAE28C3079E8@Web.DE> References: <87aaqq1kyz.fsf@rimspace.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1277023647 6650 80.91.229.12 (20 Jun 2010 08:47:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Jun 2010 08:47:27 +0000 (UTC) To: "help-gnu-emacs@gnu.org list" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 20 10:47:25 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQGBZ-0007i9-25 for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jun 2010 10:47:25 +0200 Original-Received: from localhost ([127.0.0.1]:50347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQGBY-0003Aj-Lc for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jun 2010 04:47:24 -0400 Original-Received: from [140.186.70.92] (port=39420 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQGB2-00039O-QS for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 04:46:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQGB1-0000bS-G3 for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 04:46:52 -0400 Original-Received: from fmmailgate01.web.de ([217.72.192.221]:57721) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQGB1-0000bD-25 for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 04:46:51 -0400 Original-Received: from smtp08.web.de ( [172.20.5.216]) by fmmailgate01.web.de (Postfix) with ESMTP id B6E9316099A82 for ; Sun, 20 Jun 2010 10:46:48 +0200 (CEST) Original-Received: from [91.35.224.57] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (WEB.DE 4.110 #4) id 1OQGAy-0004sz-00 for help-gnu-emacs@gnu.org; Sun, 20 Jun 2010 10:46:48 +0200 In-Reply-To: <87aaqq1kyz.fsf@rimspace.net> X-Mailer: Apple Mail (2.936) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX18Q0ugz0S8bbaTn6g9x4f278VquLuOeIJK8C8pL KUtudDEFRRsSz+KWrtACR2vlvVPdGnML+lylaDThn954sakSJv F8vCH0rcjXu89KsR/WMA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73938 Archived-At: > Qiang Guo writes: > >> I'm using a emacs 23.2 I built on Mac OSX under X11. However, it =20 >> can't not >> recognize fonts like Monaco which are available in X11. For =20 >> example, I can >> see fonts by xlsfonts command. Is there any compiling parameter =20 >> missing ? You should configure libfontconfig (start with M-x manual-entry RET fc-=20= list RET and check also /usr/X11/lib/X11/fontconfig/conf.d/05-osx-=20 fonts.conf) so that this user-side font service finds the fonts. Then =20= create the cache files with (sudo) fc-cache. Another option is to make sure that in /Library/Fonts etc. the files =20 fonts.dir and fonts.scale exist. In GNU Emacs you can also check which fonts are actually available: M-x set-frame-font RET TAB TAB C-g A volatile buffer *Completions* has been created containing the list =20 of fonts. Or use this function from Miles Bader: ;;; list-fonts-display via font-config (defun list-fonts-display (&optional matching) "Display a list of font-families available via font-config, in a =20= new buffer. If the optional argument MATCHING is non-nil, only font families matching that regexp are displayed; interactively, a prefix argument will prompt for the regexp. The name of each font family is displayed using that family, as well as in the default font (to handle the case where a font cannot be used to display its own name)." (interactive (list (and current-prefix-arg (read-string "Display font families matching regexp: ")))) (let (families) (with-temp-buffer (shell-command "fc-list : family" t) (goto-char (point-min)) (while (not (eobp)) (let ((fam (buffer-substring (line-beginning-position) (line-end-position)))) (when (or (null matching) (string-match matching fam)) (push fam families))) (forward-line))) (setq families (sort families (lambda (x y) (string-lessp (downcase x) (downcase = y))))) (let ((buf (get-buffer-create "*Font Families*"))) (with-current-buffer buf (erase-buffer) (dolist (family families) ;; We need to pick one of the comma-separated names to ;; actually use the font; choose the longest one because = some ;; fonts have ambiguous general names as well as specific ;; ones. (let ((family-name (car (sort (split-string family ",") (lambda (x y) (> (length x) (length = y)))))) (nice-family (replace-regexp-in-string "," ", " = family))) (insert (concat (propertize nice-family 'face (list :family = family-name)) " (" nice-family ")")) (newline))) (goto-char (point-min))) (display-buffer buf)))) -- Greetings Pete Perl=97the only language that looks the same before and after RSA =20 encryption. - Keith Bostic