From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.devel Subject: Fonts and fontsets on X Date: Fri, 12 Oct 2012 18:38:30 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1350060012 3433 80.91.229.3 (12 Oct 2012 16:40:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2012 16:40:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 18:40:17 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TMiHY-0002k4-Mi for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2012 18:40:16 +0200 Original-Received: from localhost ([::1]:47038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMiHS-0003yG-4L for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2012 12:40:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMiHJ-0003tK-I3 for emacs-devel@gnu.org; Fri, 12 Oct 2012 12:40:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMiHI-0001Ui-Dc for emacs-devel@gnu.org; Fri, 12 Oct 2012 12:40:01 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMiHI-0001Ub-6X for emacs-devel@gnu.org; Fri, 12 Oct 2012 12:40:00 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TMiHM-0002b2-5G for emacs-devel@gnu.org; Fri, 12 Oct 2012 18:40:04 +0200 Original-Received: from 193.106.183.18 ([193.106.183.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Oct 2012 18:40:04 +0200 Original-Received: from wavexx by 193.106.183.18 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Oct 2012 18:40:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 69 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.106.183.18 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154297 Archived-At: Hi everyone. I would like to have some insider's comments about fontsets. I'm trying both emacs 23/24 from debian. Can fontsets be used as a decent "fallback" mechanism whenever the requested glyph of a font is missing? The typical case scenario is a monospaced font that comes in both normal/bold variants, but the bold face does not contain all glyphs. Showing the glyph from the normal face would be better than using another face. My initial approach to this was: (create-fontset-from-fontset-spec "-unknown-Droid Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-fontset-normal,-unknown-DejaVu Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-*") (create-fontset-from-fontset-spec "-unknown-Droid Sans Mono-bold-normal-normal-*-18-*-*-*-*-*-fontset-bold,-unknown-Droid Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-*,-unknown-DejaVu Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-*") (set-face-attribute 'default :font "fontset-normal") (set-face-attribute 'bold :font "fontset-bold") But, it doesn't seem to work as intended. I still see glyphs coming from a different face (math greek letters, for exacly). Why exactly? My second attempt was to use fontconfig, which works correctly under urxvt: Droid Sans Mono DejaVu Sans Mono Droid Sans bold Droid Sans Regular notice how I define a "same" binding which replaces the fullname of the font for the bold variant, and then a general weak fallback. However, emacs still completely ignores my definition, and C-u C-x = confirms that the font being displayed is not the one I requested. By reading the manual, starting emacs with -fn 'Droid Sans Mono' should use all glyps from Droid (then DejaVu Sans, if my fontconfig setup is ok), and *then* use fontset-default. Then, let's assume I have a different family for 'variable-pitch, which is reasonable, since I don't want monospaced glyphs here. Again, it seems that the only way I can make use of the font's own glyphs before the fallback is to define its own fontset and redefine all the ranges. Either I don't get it, or fontset doesn't seem to play well at all with font-lock and different faces.