[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Japanese font settings ?
From: |
Yuri Khan |
Subject: |
Re: Japanese font settings ? |
Date: |
Sat, 23 May 2020 15:55:03 +0700 |
On Sat, 23 May 2020 at 14:38, Jean-Christophe Helary
<jean.christophe.helary@traduction-libre.org> wrote:
> ============================================================
> Fontsets can be modified using the function `set-fontset-font',
> specifying a character, a charset, a script, or a range of characters
> to modify the font for, and a font specification for the font to be
> ============================================================
>
> 2) the Emacs manual does not have a relevant index entry for "scripts". There
> is no "list-scripts" command that would tell me which scripts are supported
> in emacs,
The manual doesn’t, but the docstring for ‘set-fontset-font’ says:
TARGET may be a script symbol. In that case, use FONT-SPEC for
all the characters that belong to the script. See the variable
‘script-representative-chars’ for the list of known scripts.
Following the link to ‘script-representative-chars’ displays several
scripts. Unfortunately, the list is truncated to the first ten
elements with no obvious way to see the whole value. I had to resort
to typing this in *scratch*:
(let ((print-length nil))
(insert (pp script-representative-chars)))
After that, I was able to confirm that ‘kana’ is in fact a script symbol.
> What the emacs manual should have is:
>
> 1) a link to the elisp manual for set-fontset-font
> 2) the reference to list-character-sets and to script-representative-chars
> 3) an example that applies set-fontset-font to a list of scripts
> 3) a way to *find* a range of character: do we use list-character-sets, click
> on a given character set and from there ? Is there a better way ?
If you have a buffer with a character you’re interested in, you put
the point before it and invoke ‘describe-char’ (C-u C-x =). Among
other things, it tells you its script.
I think it would help much if:
* There was a link from the manual to the docstring of
‘set-fontset-font’. (I understand there is some ongoing work to
provide such links, in case you use Emacs and Info to read the
manual.)
* There was a way, looking at the help for
‘script-representative-chars’ with abbreviated value, to expand it to
the whole value. The obvious UI would be to make the abbreviation
ellipsis a button that, when activated, produced the full value.
In practice, though, I use the ‘unicode-fonts’ package. I guess the
politically correct way to refer to it is
git clone git@github.com:rolandwalker/unicode-fonts.git
but I will also mention that it is available from *an* ELPA.
- Japanese font settings ?, Jean-Christophe Helary, 2020/05/22
- Re: Japanese font settings ?, Eli Zaretskii, 2020/05/22
- Re: Japanese font settings ?, Jean-Christophe Helary, 2020/05/22
- Re: Japanese font settings ?, Eli Zaretskii, 2020/05/23
- Re: Japanese font settings ?, Jean-Christophe Helary, 2020/05/23
- Re: Japanese font settings ?, Eli Zaretskii, 2020/05/23
- Re: Japanese font settings ?, Jean-Christophe Helary, 2020/05/23