[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fonts and fontsets on X
From: |
Kenichi Handa |
Subject: |
Re: Fonts and fontsets on X |
Date: |
Tue, 16 Oct 2012 21:06:53 +0900 |
In article <address@hidden>, Yuri D'Elia <address@hidden> 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
address@hidden