Configure Unicode fonts for Emacs.
- Quickstart
- Testing
- Customization
- Overview
- Minimum Useful Fonts
- Startup Speed
- Unmapped Blocks
- Emoji
- Bugs
- Free International and Symbol Fonts
- Non-free Fonts
- Chinese and Arabic Scripts
- Unicode "Scripts"
- Compatibility and Requirements
-
Make sure you have installed
font-utils,ucs-utilsandlist-utils. -
Download the
unicode-fonts.elfile, and put it somewhere Emacs can find it, e.g.~/.emacs.d/unicode-fonts. -
Remove Unifont from your system.
-
Install these fonts
- https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip
- http://www.quivira-font.com/files/Quivira.ttf ; or Quivira.otf
- http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2
- https://fonts.google.com/download?family=Noto%20Sans
- https://fonts.google.com/download?family=Noto%20Sans%20Symbols
-
Use an extended Latin font for your default face, such as Monaco, Consolas, or DejaVu Sans Mono.
-
Add the following to your
.emacsfile:(add-to-list 'load-path "~/.emacs.d/unicode-fonts/") (require 'unicode-fonts) (unicode-fonts-setup)
| Keystrokes | Notes |
|---|---|
| C-h h | same as M-x view-hello-file |
| M-x list-charset-chars RET unicode-bmp RET | search for eg 210x |
| M-x list-charset-chars RET unicode-smp RET | if your display backend supports astral chars |
| M-x unicode-fonts-debug-insert-block RET Mathematical_Operators RET |
M-x customize-group RET unicode-fonts RET
Emacs maintains font mappings on a per-glyph basis, meaning that multiple fonts are used at the same time (transparently) to display any character for which you have a font. Furthermore, Emacs does this out of the box.
However, font mappings via fontsets are a bit difficult to configure. In addition, the default setup does not always pick the most legible fonts. As the manual warns, the choice of font actually displayed for a non-ASCII character is "somewhat random".
The Unicode standard provides a way to organize font mappings: it divides character ranges into logical groups called "blocks". This library configures Emacs in a Unicode-friendly way by providing mappings from
each Unicode block ---to---> a font with good coverage
and makes the settings available via the customization interface.
This library provides font mappings for 233 of the 255 blocks in the Unicode 8.0 standard which are public and have displayable characters. It assumes that 6 Latin blocks are covered by the default font. 16/255 blocks are not mapped to any known font.
To use unicode-fonts, place the unicode-fonts.el file somewhere
Emacs can find it, and add the following to your ~/.emacs file:
(require 'unicode-fonts)
(unicode-fonts-setup)See important notes about startup speed below.
To gain any benefit from the library, you must have fonts with good Unicode support installed on your system. If you are running a recent version of OS X or Microsoft Windows, you already own some good multi-lingual fonts, though you would do very well to download and install the six items below:
DejaVu Sans, DejaVu Sans Mono
Quivira
Symbola
Noto Sans, Noto Sans Symbols
It is also recommended to remove GNU Unifont from your system. Unifont is very useful for debugging, but not useful for reading.
The default options favor correctness and completeness over speed, and can add many seconds to initial startup time in GUI mode.
However, when possible a font cache is kept between sessions. If you have persistent-soft.el installed, when you start Emacs the second time, the startup cost should be negligible.
The disk cache will be rebuilt during Emacs startup whenever a font is added
or removed, or any relevant configuration variables are changed. To increase
the speed of occasionally building the disk cache, you may use the
customization interface to remove fonts from unicode-fonts-block-font-mapping
which are not present on your system.
On the assumption that an extended Latin font such as Monaco, Consolas, or DejaVu Sans Mono is already being used for the default face, no separate mappings are provided for the following Unicode blocks:
Basic Latin
Latin Extended Additional
Latin Extended-A
Latin Extended-B
Latin-1 Supplement
Spacing Modifier Letters
though some of these remain configurable via customize.
Color Emoji are enabled by default when using the Native Mac port on OS X. This can be disabled by customizing each relevant mapping, or by turning off all multicolor glyphs here:
M-x customize-variable RET unicode-fonts-skip-font-groups RET
Calling set-fontset-font can easily crash Emacs. There is a
workaround, but it may not be sufficient on all platforms.
Tested on Cocoa Emacs, Native Mac Emacs, X11/XQuartz,
MS Windows XP.
Widths of alternate fonts do not behave as expected on MS Windows. For example, DejaVu Sans Mono box-drawing characters may use a different width than the default font.
Free fonts recognized by this package may be downloaded from the following locations. For any language, it is increasingly likely that Noto Sans provides coverage:
Noto Sans and friends ; 181 Unicode blocks and counting; sole
; source for these blocks:
;
; Bamum / Bamum Supplement / Kaithi
; Mandaic / Meetei Mayek Extensions
; Sundanese Supplement
;
; Also a good source for recently-added
; glyphs such as "Turkish Lira Sign".
From http://scripts.sil.org/cms/scripts/page.php?item_id=CharisSIL_download
or http://scripts.sil.org/cms/scripts/page.php?item_id=DoulosSIL_download
Charis SIL or Doulos SIL ; Extended European and diacritics
Gentium Plus ; Greek
From http://users.teilar.gr/~g1951d/ ; NOTE: site is down as of July 2015
Aegean, Aegyptus, Akkadian ; Ancient languages
Analecta ; Ancient languages, Deseret
Anatolian ; Ancient languages
Musica ; Musical Symbols
Nilus ; Ancient languages
MPH 2B Damase ; Arabic, Armenian, Buginese, Cherokee, Georgian,
; Glagolitic, Hanunoo, Kharoshthi, Limbu, Osmanya,
; Shavian, Syloti Nagri, Tai Le, Thaana
Namdhinggo SIL ; Limbu
WenQuanYi Zen Hei ; CJK (Simplified Chinese)
BabelStone Han ; CJK (Simplified Chinese)
BabelStone Phags-pa Book ; Phags-pa
BabelStone Modern ; Tags / Specials / Selectors
HAN NOM A, HAN NOM B ; CJK (Nôm Chinese)
Un Batang ; CJK (Hangul)
Hana Min A, Hana Min B ; CJK (Japanese)
Nuosu SIL ; CJK (Yi)
Daicing Xiaokai ; Mongolian
Jomolhari ; Tibetan
Tibetan Machine Uni ; Tibetan
Padauk ; Myanmar
Myanmar3 ; Myanmar
Yunghkio ; Myanmar
TharLon ; Myanmar
Masterpiece Uni Sans ; Myanmar
Samyak ; Gujarati, Malayalam, Oriya, Tamil
Annapurna SIL ; Devanagari
AnmolUni ; Gurmukhi
Kedage ; Kannada
Mukti Narrow ; Bengali
Akshar Unicode ; Sinhala
Eeyek Unicode ; Meetei Mayek
Khmer Mondulkiri ; Khmer
Saysettha MX ; Lao
Lanna Alif ; Tai Tham
Dai Banna SIL ; New Tai Lue
Tai Heritage Pro ; Tai Viet
Sundanese Unicode ; Sundanese
Amiri ; Arabic (Naskh)
Scheherazade ; Arabic (Naskh)
Koodak ; Arabic (Farsi)
Ahuramzda ; Avestan
Abyssinica SIL ; Ethiopic
Estrangelo Nisibin ; Syriac
Conakry ; N'ko
Ribeng ; Chakma
Adinatha Tamil Brahmi ; Brahmi
FreeMono, etc (FreeFont) ; Kayah Li (and others)
Batak-Unicode ; Batak
Mingzat ; Lepcha
From http://phjamr.github.io/lisu.html#install
http://phjamr.github.io/miao.html#install
http://phjamr.github.io/mro.html#install
Lisu Unicode ; Lisu
Miao Unicode ; Miao
Mro Unicode ; Mro
Cardo ; Historical Languages
Junicode ; Historical Languages
Dukor ; Vai
ZH Mono ; Inscriptional Pahlavi / Parthian
Aramaic Imperial Yeb ; Imperial Aramaic
Aboriginal Sans ; Aboriginal Languages
Aboriginal Serif
Ezra SIL ; Hebrew
Antinoou ; Coptic / General Punctuation
New Athena Unicode ; Ancient Languages / Symbols
KhojkiUnicodeOT ; Khojki
AhomUnicode ; Ahom
OldSindhi ; Khudawadi
MuktamsiddhamG ; Siddham (note trailing "G" on font name)
MarathiCursiveG ; Modi (note trailing "G" on font name)
OldHungarian ; Old Hungarian
Albanian ; Elbasan / Takri / Sharada
Cham OI_Tangin ; Cham
Asana Math ; Mathematical Symbols
Many non-free fonts are referenced by the default settings. However, free alternatives are also given wherever possible, and patches are of course accepted to improve every case.
If you are using a language written in Chinese or Arabic script,
try customizing unicode-fonts-skip-font-groups to control which
script you see, and send a friendly bug report.
Unicode also defines the notion of a "script" as a higher-level abstraction which is independent of "blocks". Modern fonts can report their script coverage, and Emacs may also access that information. However, this library ignores scripts in favor of blocks and glyphs.
GNU Emacs version 23.3 and higher : yes
GNU Emacs version 22.3 and lower : no
Requires fonts-utils.el, ucs-utils.el
Uses if present: persistent-soft.el (Recommended)

