46

Can anybody please tell me the monospace font that covers most of the unicode characters If not then a monospace font that contains most of the european language character set ?

deepak
  • 983
  • 3
  • 15
  • 19
  • 1
    `Noto Sans Mono`, https://www.google.com/get/noto/#sans-mono , I changed my TeXStudio editor font to that, it has the variety unicode chars I use. – tatojo May 25 '21 at 19:41

10 Answers10

27

I'm also searching for mono space, rich Unicode font. So far I use DejaVu Sans Mono, but I wanted to know whether there is better (for me) replacement.

So, as of today, I have downloaded the following TTF fonts and count their number of glyphs:

But their usefulness is also matter of what symbols are exactly supported and how they look. For example the Fixedsys and Unifont have old-school appearance. Anyway, this could be useful info for somebody...

Rado
  • 766
  • 7
  • 14
19

Nearly every font nowadays covers at least Latin, Greek and Cyrillic. And enough of Latin to support most European languages.

However, there can't be a single font covering most of Unicode, as OpenType is limited to 65536 glyphs and there are more code points assigned so far. Also it's a common misconception that a single font for as many scripts as possible is a Good Thing™. It's not, actually. Remember that for the font to work other things must be in place as well: properly defined diacritics support (so combining accents actually appear above/below the base characters and not somewhere next to them), precomposed glyphs for some scripts so the rendering engine can use them properly, this includes Arabic and and Indic scripts, ...

It's a major undertaking and as such it's not surprising that pretty much the only fonts covering large portions of Unicode are last-resort fonts, intended to be used when no other font exists to display something. As a fallback mechanism, but never as a first choice. The preferred way is actually to let the rendering engine sort out script support for fonts and not try to cram it all into a single font. See also Michael Kaplan's take on this: Arial Unicode MS effectively [bites|sucks|blows] .

Still, if you're only looking for glyph support:

  • Fixedsys Excelsior
  • Everson Mono
  • DejaVu Sans Mono
  • Roboto Mono

Those fonts are pretty large already. But as noted above, don't count on correct workings of complex scripts or typography.

Joey
  • 344,408
  • 85
  • 689
  • 683
  • 3
    Use Case: If you are working with xelatex or lualatex with large multilingual documents and you'd like to read the logs, then you're probably going to need a typeface that can cover many glyphs such that you can properly identify missing characters in the logs e.g. "Missing character: There is no (character) in font [...]" (if character does not exist, you just see a square box). – Jonathan Komar Jan 23 '17 at 14:40
  • @macmadness86: Restrictions of the Windows console notwithstanding, font substitution is a thing and works and it's the proper solution here. As noted there is a *technical* reason why this cannot be done, so finding use cases to advocate for something that cannot be done is a futile effort, I think. Also, I'd hope XeLaTeX gives you error messages that unambiguously mark the error by line/column number. – Joey Jan 23 '17 at 14:44
  • I was merely adding a use case where having many glyphs is important--like 65536 of them. In situations where >65536 glyphs are needed, substitution is supported by xelatex using `\XeTeXcharclass` and `\XeTeXinterchartoks`. Unfortunately, error messages regarding missing characters are often ambiguous :( – Jonathan Komar Jan 23 '17 at 14:55
  • Isn't it __Roboto__ Mono? – SwiftsNamesake Sep 05 '17 at 11:45
  • @SwiftsNamesake: Sure; you can also edit the answer directly, which is perhaps easier :-) – Joey Sep 05 '17 at 11:50
  • 1
    A limitation of font substitution: It messes up column alignment. I'm running into this issue with emacs and `prettify-symbols-mode'. – kdb Jun 08 '18 at 11:23
  • 1
    Well, you'd need monospace fonts with the same metrics for that to work, although I think that applications that require an actual character grid, such as a console, should take care of positioning glyphs themselves. – Joey Jun 09 '18 at 05:11
  • Lucida Sans Unicode isn't monospaced: The very first word in the question headline. – Ben Philipp Jan 11 '21 at 00:49
16

Osaka Mono (If you are crazy like me and want to program with Japanese variable names.) Osaka Mono At 24PT

Full Name: Osaka-等幅

CSS: font-family:'Osaka-Mono';

After looking at 25+ fonts, I only found 1 that fit all of my criteria for programming:

Chart Key:
==============================================
FWK : Full Width Kanji
FWR : Full Width Roman Characters
HWA : Half Width Ascii Characters
oO0 : Can differentiate o vs O vs 0 ?
il1 : Can differentiate i vs l vs 1 ?
ZOM : Does NOT mis-align when zooming?
==============================================
                FWK  FWR  HWA  oO0  il1  ZOM 
*Osaka Mono   :  Y    Y    Y    Y    Y    Y
GNU Unifont   :  Y    Y    Y    Y    Y    -
*NotoSansMCJR :  Y    Y    Y    -    Y    -
*MS Gothic    :  Y    Y    Y    -    *    Y
Kochi Gothic  :  Y    Y    Y    -    -    Y
Hanazono Micho:  Y    Y    Y    -    -    Y
MS Hei        :  Y    Y    Y    -    -    Y
**IPA Gothic  :  Y    Y    Y    Y    Y    Y

*NotoSansMCJR : Full name is "Noto Sans Mono CJK JP Regular"
*MS Gothic    : il1 difference is subtle.
*Osaka Mono   : 
                CSS: font-family:'Osaka-Mono';
                In text editor drop down, will
                likely be: "Osaka-等幅"

**IPA Gothic  : The "\" symbol displays as a
                yen sign in HTML pages and
                my text editor. Deal breaker.

Fonts I found unsuable because either:

  1. Kanji were not exactly 2 ascii chars wide.
  2. Full width unicode letters were not exactly 2 ascii chars wide.

==============================================

  1. Andale Mono
  2. Apple Gothic
  3. Bitstream Cyberbit
  4. Consolas
  5. DejaVu Sans Mono
  6. Everson Mono
  7. FixedSys Excelsior
  8. Free Mono
  9. Han Wang Hei Heavy
  10. Han Wang Min Black
  11. Han Wang Zon Yi
  12. Kaiso Next B
  13. Kozuka Gothic Pro R
  14. Lucidia Sans Unicode
  15. Monospace (By George William )
  16. Nanum Gothic
  17. Noto Mono
  18. Noto Mono Regular
  19. Noto Sans CJK JP Regular
  20. Osaka
  21. Roboto
  22. Roboto Mono
  23. Un Yetgul

==============================================

KANJICODER
  • 3,611
  • 30
  • 17
  • 2
    Fantastic comparison, upvoted. Any idea where to obtain Osaka-Mono? – zx81 Feb 23 '19 at 14:42
  • 1
    Searching for "Osaka - 等幅" where "等幅" is Japanese for "Monospaced" will help. Google translate will be your friend, because I found it on a Japanese website. I don't read Japanese. I just like Kanji and can recognize more symbols than most non readers. – KANJICODER Mar 24 '19 at 16:00
11

There's the GNU Unifont project, which more or less has this as its goal.

Teddy
  • 6,013
  • 3
  • 26
  • 38
5

For those of you who were in need of an overview to make sense of many good suggestions here and elsewhere: here is something I made.

I downloaded 39 monospaced fonts I found on the internet and used Fontkit to get the number of supported Unicode points. I manually added the supported styles. I hope this helps!

Font #Supported Unicode Points Styles
GNU Unifont1 57087 Regular
Nanum Gothic Coding2 12478 Bold, Regular
JuliaMono 9800 Regular
Everson Mono3 9643 Bold, BoldOblique, Oblique, Regular
GNU Freefont 4160 Bold, BoldOblique, Oblique, Regular
Noto Sans Mono4 3367 Black, Bold, ExtraBold, ExtraLight, Light, Medium, Regular, SemiBold, Thin
DejaVu Sans Mono 3258 Bold, BoldOblique, Oblique, Regular
Monospace 2881 Bold, Oblique, Regular
Cousine 2275 Bold, BoldItalic, Italic, Regular
Overpass Mono 1642 Bold, Light, Medium, Regular, SemiBold
Fira Code 1586 Bold, Light, Medium, Regular, Retina, SemiBold
Hack 1549 Bold, BoldItalic, Italic, Regular
Fira Mono 1350 Bold, Medium, Regular
Source Code Pro 1334 Black, BlackItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, ExtraLight, ExtraLightItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItaliic
Nova Mono 1329 Regular
Ubuntu Mono 1225 Bold, BoldItalic, Italic, Regular
Jetbrains mono 1182 Bold, BoldItalic, ExtraBold, ExtraBoldItalic, ExtraLight, ExtraLightItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItaliic, Thin, ThinItalic
Input 923 Black, BlackItalic, Bold, BoldItalic, ExtraLight, ExtraLightItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, Thin, ThinItalic
Inconsolata 883 Regular
Roboto Mono 877 Bold, BoldItalic, ExtraLight, ExtraLightItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItaliic, Thin, ThinItalic
Droid Sans Mono 872 Regular
PT Mono 806 Regular
IBM Plex Mono 751 BlackItalic, Bold, BoldItalic, ExtraLight, ExtraLightItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItaliic, Thin, ThinItalic
Anonyous Pro 624 Bold, BoldItalic, Italic, Regular
Monoid 619 Bold, Italic, Regular, Retina
Space Mono 614 Bold, BoldItalic, Italic, Regular
B612 Mono 590 Bold, BoldItalic, Italic, Regular
Major Mono Display 582 Regular
VT323 569 Regular
Xanh Mono 468 Italic, Regular
Cutive Mono 440 Regular
Azeret Mono 434 Black, BlackItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, ExtraLight, ExtraLightItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItaliic, Thin, ThinItalic
Spline Sans Mono 412 Bold, BoldItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItalic
Red Hat Mono 393 Bold, BoldItalic, Italic, Light, LightItalic, Medium, MediumItalic, Regular, SemiBold, SemiBoldItaliic
Courier Prime 384 Bold, BoldItalic, Italic, Regular
DM Mono 382 Italic, Light, LightItalic, Medium, MediumItalic, Regular
Syne Mono 380 Regular
Oxygen Mono 360 Regular
Share Tech Mono 268 Regular

1Although the Unicode support is superior, the font itself is quite 'blocky' because of its BMP origin.
2The Unicode support might seem high, but this is mostly due to the support of the Korean language.
3This font doesn't seem to handle the non-breaking spaces differently.
4Some characters use a double amount (basically 2 'normal' characters) of width.
Gertjan Kruiger
  • 111
  • 2
  • 3
1

The Unicode font called Monospace will cover pretty much all European characters, but lacks the Asian ones.

Joe Mabel
  • 1,372
  • 10
  • 29
1

Consolas is a modern monospace font shipped with Micosoft's products.

An example of a font that covers a wide range of Unicode characters is Arial Unicode shipped with Microsoft Office products.

Taneli Waltari
  • 677
  • 3
  • 5
  • 5
    (a) It's Arial Unicode MS. (b) It's not monospaced. (c) It's a last-resort font, not one that should be specified to use: http://blogs.msdn.com/michkap/archive/2007/07/15/3890144.aspx – Joey Dec 21 '09 at 10:30
  • @Joey and (d) that link is broken :) – Clément Sep 21 '15 at 15:33
  • @Clément: I think it was [this one](http://www.siao2.com/2007/07/15/3890144.aspx). – Joey Sep 21 '15 at 18:55
0

While the technical specifications exist that would permit to create huge fonts, potentially covering the whole unicode range, in practice: – many apps and software stacks do not support all those opentype extensions (typically locl and OTC: https://blogs.adobe.com/CCJKType/2014/09/shs-otf-or-otc.html ) – designing all the required glyphs, and their composition rules, is a huge undertaking, many man-years to do it right

So such fonts do not exist now, or trade coverage for quality

Therefore international software should not posit the existence of a pan-unicode font but be able to compose as many different fonts as needed, with different and often overlapping coverage. It makes the software developer work harder as one may not assume the same font file is used for consecutive glyphs.

This is how modern text stacks work (for example harfbuzz-ng + fontconfig…)

nim
  • 2,345
  • 14
  • 13
0

The ONLY standard install font I have ever found that works with a good range of unicode blocks encoded is...

FONT="-misc-fixed-medium-r-*-*-15-*-75-75-c-90-iso10646-1"
BFONT="-misc-fixed-bold-r-*-*-15-*-75-75-c-90-iso10646-1"

I set Xresources to...

XtDefaultFont:  -misc-fixed-bold-r-*-*-15-*-75-75-c-90-iso10646-1
XTerm*font:     -misc-fixed-medium-r-*-*-15-*-75-75-c-90-iso10646-1
XTerm*boldFont: -misc-fixed-bold-r-*-*-15-*-75-75-c-90-iso10646-1

This Font includes Glyphs for...

Arrows U+2190
Mathematical U+2200
Technical U+2300
Miscellaneous U+2400
Graphics U+2500
Miscellaneous Symbols U+2600
Dingbats U+2700
Braile U+2800

I have tried to use the newer, GTK and Truetype unicode fonts. And while they implement a larger range of glyphs, including he latest emoji. But they mostly suffer when you simply want a fixed-width font that really is FIXED-WIDTH!

The Graphics and Mathematical Blocks for example often do not work with character extensions across multiple lines. You often only have to look at Extended Braces, to see the font and application falling flat on its face, with symbol characters not lining up properly.

Add to that the applications often leave gaps between characters or between lines, making characters 'fuzzy' from over use of scaling and anti-aliasing in the rendering, or not implementing the combining properities for the unicode block "Combining Diacritical Marks for Symbols U+20D0 - U+20FF" and you see the newer fonts are basically a sorry mess!

Basically XTerms, and X-Window "fixed" font (as above) seemed to have put in the time and thought put into making the font work properly as a whole.

Big thanks to Markus Kuhn for such a great effort!

For my notes from researching this see... http://www.ict.griffith.edu.au/anthony/info/data/utf8-demo.txt

anthony
  • 7,696
  • 1
  • 17
  • 11
0

Noto Sans Mono, https://www.google.com/get/noto/#sans-mono , I changed my TeXStudio editor font to that, it has the variety unicode chars I use.

tatojo
  • 226
  • 6
  • 11