From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Fonts and fontsets on X Date: Tue, 16 Oct 2012 21:06:53 +0900 Message-ID: <874nluy61u.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1350389340 8957 80.91.229.3 (16 Oct 2012 12:09:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2012 12:09:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Yuri D'Elia Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 16 14:09:07 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 1TO5xF-0003BC-Fn for ged-emacs-devel@m.gmane.org; Tue, 16 Oct 2012 14:09:01 +0200 Original-Received: from localhost ([::1]:59844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO5x8-0004CK-AH for ged-emacs-devel@m.gmane.org; Tue, 16 Oct 2012 08:08:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO5x2-0004Bj-HA for emacs-devel@gnu.org; Tue, 16 Oct 2012 08:08:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO5ww-0007qC-Bf for emacs-devel@gnu.org; Tue, 16 Oct 2012 08:08:48 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:60488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO5ww-0007q6-8a for emacs-devel@gnu.org; Tue, 16 Oct 2012 08:08:42 -0400 Original-Received: from 253.240.accsnet.ne.jp ([202.220.240.253]:54919 helo=mongkok) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TO5wv-0006YQ-FD; Tue, 16 Oct 2012 08:08:42 -0400 In-Reply-To: (message from Yuri D'Elia on Fri, 12 Oct 2012 18:38:30 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.10 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:154368 Archived-At: In article , Yuri D'Elia writes: > 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-*-*-*-*-*-*") If you want to specify the default font exactly by name, please use "ascii" for SCRIPT-NAME as below (see the docstring of create-fontset-from-fontset-spec): (create-fontset-from-fontset-spec "-unknown-Droid Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-fontset-normal,\ ascii:-unknown-DejaVu Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-*") (create-fontset-from-fontset-spec "-unknown-Droid Sans Mono-bold-normal-normal-*-18-*-*-*-*-*-fontset-bold,\ ascii:-unknown-Droid Sans Mono-normal-normal-normal-*-18-*-*-*-*-*-*") > (set-face-attribute 'default :font "fontset-normal") > (set-face-attribute 'bold :font "fontset-bold") The aboves are syntax error. Do this: (set-face-attribute 'default nil :font "fontset-normal") (set-face-attribute 'bold nil :font "fontset-bold") With them, my bold face uses "Droid Sans Mono" font. --- Kenichi Handa handa@gnu.org