all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@gnu.org>
To: Yuri D'Elia <wavexx@users.sourceforge.net>
Cc: emacs-devel@gnu.org
Subject: Re: Fonts and fontsets on X
Date: Tue, 16 Oct 2012 21:06:53 +0900	[thread overview]
Message-ID: <874nluy61u.fsf@gnu.org> (raw)
In-Reply-To: <k59h1n$23t$1@ger.gmane.org> (message from Yuri D'Elia on Fri, 12 Oct 2012 18:38:30 +0200)

In article <k59h1n$23t$1@ger.gmane.org>, Yuri D'Elia <wavexx@users.sourceforge.net> 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



      reply	other threads:[~2012-10-16 12:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 16:38 Fonts and fontsets on X Yuri D'Elia
2012-10-16 12:06 ` Kenichi Handa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nluy61u.fsf@gnu.org \
    --to=handa@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=wavexx@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.