From: Florian Beck <abstraktion@t-online.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Browsing Unicode Symbols
Date: Wed, 09 Jul 2008 00:52:06 +0200 [thread overview]
Message-ID: <87iqvg56qx.fsf@sophokles.streitblatt.de> (raw)
In-Reply-To: mailman.14397.1215531445.18990.help-gnu-emacs@gnu.org
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 08.07.2008 um 14:58 schrieb Nordlöw:
>
>> Is there a way to visually browse/explore the Unicode symbols
>> available in GNU Emacs (CVS) either globally or locally defined by a
>> specific/current font? Compare list-colors-display().
>
> Yes. Open utf8.txt from the Kermit distribution. When you're using
> only fonts (as opposed to fontsets) then you'll see, what this font
> can offer for you.
How exactly do I do this: »using only fonts (as opposed to fontsets)«?
As far as I can see I am always using a fontset.
Anyway, to see how a certain character is displayed, simply insert it:
(insert (propertize STRING 'face `(:family ,(format "%s" FONT))))
To visualise how a certain character is displayed by all your fonts, you
can use something like this:
(defun insert-char-all-fonts (char &optional collection start end)
"Insert CHAR with all fonts in COLLECTION."
(let ((collection (delete-dups (or collection (mapcar #' (lambda (font) (aref font 0)) (x-family-fonts)))))
(i 0))
(dolist (font collection)
(if (and (or (not start) (>= i start))
(or (not end) (<= i end)))
(insert ;(get-char-with-font char font)
(propertize char 'face `(:family ,(format "%s" font)))))
(incf i))))
You have to turn off font-lock to see the effect.
Caveat: this gets *very* slow if you have a lot of fonts (use start and
end).
To see how a specific font renders all characters, dolist the characters
defined in the the unicode standard (/admin/unidata/UnicodeData.txt in
the emacs sources).
--
Florian Beck
next prev parent reply other threads:[~2008-07-08 22:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 12:58 Browsing Unicode Symbols Nordlöw
2008-07-08 15:37 ` Peter Dyballa
[not found] ` <mailman.14397.1215531445.18990.help-gnu-emacs@gnu.org>
2008-07-08 22:52 ` Florian Beck [this message]
2008-07-09 8:08 ` Peter Dyballa
[not found] ` <mailman.14434.1215590915.18990.help-gnu-emacs@gnu.org>
2008-07-09 14:32 ` Florian Beck
2008-07-10 11:04 ` Peter Dyballa
2008-07-09 7:43 ` Xah
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=87iqvg56qx.fsf@sophokles.streitblatt.de \
--to=abstraktion@t-online.de \
--cc=help-gnu-emacs@gnu.org \
/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.