complete, monospaced Unicode font? [closed]
Asked Answered
B

9

145

I'm looking for a good programming font that lets me add comments and string literals in Unicode, usually Japanese and Chinese along with some Latin and Cyrillic languages.

So far the situation seems to be "complete, monospace, free, pick 2" and Google is failing me with this (maybe because there are no good ones?).

The best I found is Arial Unicode but it's not monospace, which is a big nuisance for me and the editors I use. Not to mention Python indentation when I'm coding Python.


(Links, edits are welcome)

Breakup answered 25/2, 2009 at 15:35 Comment(2)
Based on en.wikipedia.org/wiki/Samples_of_monospaced_typefaces I would nominate Droid Sans Mono. But the page doesn't say anything about code point coverage; I know Droid's is reasonable, but many of the others on the page are fairly limited.Gosling
The "WenQuanYi Micro Hei Mono" font (on my Kubuntu machine, can't recall if I installed it separately) does mono-spacing and Japanese characters.Primus
Z
72

Unicode is big. Really big. You just won't believe how vastly hugely mind-bogglingly big it is. I mean, you might think it's a long way down the codepage to ü, but that's just peanuts to Unicode.

I really doubt there's any font in the world (monospaced or not) that has "complete" Unicode. The best you can do is find a few monospaced fonts that, together, cover the space you're interested in, and make sure your editor is set up to use them.

Zigzagger answered 25/2, 2009 at 15:35 Comment(9)
"You just won't believe how vastly hugely mind-bogglingly big it is..." - been reading the Guide, have we ? :)) (I've never seen the word "mind-bogglingly" except in that book) :))Embracery
I believe it's big and I don't mind it being big :) I'd settle for something as complete as Arial but monospace.Breakup
+1, you won't find a font that covers all of Unicode including the weird non-BMP stuff. The best you'll find are Japanese fonts, which tend to contain things like Cyrillic that are also in Shift-JIS. See eg. Microsoft's default Japanese UI font ‘Gothic’.Refraction
However, this can be a real compromise in practice as Latin letters made to fit the kanji square can be much too large and ugly. Do you really need monospace even for non-Latin characters? You'll be able to get a much prettier display by compromising on this.Refraction
I reckon monospace is hard for Arabic and some others, but my main needs are Latin subsets, Cyrillic, CJK (Chinese-Japanese-Korean). Arial Unicode covers all this then some. I'd like something like that but monospace. Gothic, Mincho are not Chinese-complete. Simsun, Mingliu etc are not jp-complete.Breakup
There can't be any font that covers all of Unicode, since Unicode has onepointsomething possible code points (400k assigned or so) and OpenType only supports 65k glyphs per font :)Humpage
"Unicode is big. Really big." Arial is big. Have you taken a look at it? It's ugly as all get-out, but it's all (nearly) there!Footsore
Monospace is not hard for Arabic. Computers have been using monospaced Arabic for decades just fine. All that needs to be done is not combining multiple characters into single glyphs. The result is not expected to match handwritten caligraphy but works great for programming. The writing systems that don't work well are those where combining multiple characters into single glyphs is mandatory, or where characters are rendered out-of-order. That means most Indic and many Southeast Asian languages and scripts.Markle
epic reference, bro. Anyway, yeah, unifont is a good choice usually.Lani
C
49

The best I've found is DejaVu Sans Mono which is a Unicode expansion of Bitstream's Vera Sans Mono.

I'm not sure there are any 'complete' fonts, so I think you'll have to deal with a patchwork of fonts.

Cymene answered 25/2, 2009 at 15:35 Comment(4)
Unfortunately, DejaVu Sans Mono 2.33 (as of 2012-09-28) doesn't include CJK ideograms, e.g. it doesn't include even basic Chinese characters. My research concluded with the only monospaced font supporting Chinese character being "GNU Unifont".Absorber
I tried DejaVu Sans Mono Book in Sublime Text2. It doesn't appear like it's a fixed-width font(I thought that's what Mono stands for).Path
It's especially good for coding, because it distinguishes l from 1 and I, and 0 from OSinglehearted
For people using Vim (at least GUI versions) you can set one font for single-cell characters (Latin, Greek, Cyrillic, Georgian, etc) and another for double-cell characters (Chinese, Japanese, Korean). I often use DejaVu Sans Mono in combination with one of the CJK fonts that comes with Windows for this purpose.Markle
C
33

GNU Unifont is a monospaced, bitmapped font with complete coverage of the Basic Multilingual Plane as defined in Unicode 5.1. It is also avaiable in True Type format.

Contingent answered 25/2, 2009 at 15:35 Comment(6)
Complete and free, but not quite fixed-width. As Roman Czyborra says, "If we wanted the character cell to be big enough to also draw any ideograph with more than 4 vertical strokes in it, we would end up with cells ... way oversized for Latin letters... Instead, I would like to ... distinguish halfwidth (ASCII) characters occupying one cell each from fullwidth (CJK) characters occupying exactly two consecutive cells. This makes the font somehow proportional (more complex characters get more space) and fixed-pitch (the cell grid is respected) at the same time." czyborra.com/unifontMousseline
Unfortunately, I had no luck with this one in PuTTY. It would display my current text but as soon as I hit Enter, everything would be blank again.Gosling
I found the GNU Unifont suggestion to be the best solution for my purposes. I use Notepad++ and selected it as the global font. I have the best compromise of both the special characters, graphics, and symbols I use (even glyphs such as a snowflake) and the standard ASCII characters I use in web development.Pyriform
I've been looking for a font that aligns unicode box drawing characters on mac... Thank you very much!Recite
my favorite option. I use it for everything in my terminals.Lani
@sampablokuper As of today, this is no longer the case - nowadays all cells in Unifont have 16x16 px dimensions.Pongee
A
15

How about Consolas? Should be lying around on most windows boxes by now.

If not it can be downloaded here:

http://www.microsoft.com/down...lang=en

It does look ugly without ClearType enabled though.

Auger answered 25/2, 2009 at 15:35 Comment(3)
Another vote on this one. It doesn't look all that bad without CT. And there is also a unix-pandan, Inconsolas or something like it (I never remember font names).Embracery
Consolas covers only Latin, Greek and Cyrillic. It's a beautiful font but it doesn't cut it for me. Forces me to use multiple fonts, which is no-go for some editors.Breakup
Inconsolata: levien.com/type/myfonts/inconsolata.htmlFidelity
A
5

I'm trying to answer this question for myself, for use in Eclipse editor.

MS ゴシック (MS Gothic) is what I'm currently trying, and that seems to be pretty good for the Japanese characters I'm dealing with. Included in Windows since 2000.

Andrew answered 25/2, 2009 at 15:35 Comment(2)
It's ugly as hell for Latin and especially Cyrillic (it comes out as double width), but +1.Gosling
Also, I had to open up the Windows 7 fonts and click "Show" on this font before I could select it in the font menu; it is installed but hidden by default in my install (Windows 7 Pro US English). I also had to restart PuTTY in order for it to update its font list.Gosling
C
5

Before Consolas, I always used Andale Mono as my programmer font. There's a free download available.

Cronin answered 25/2, 2009 at 15:35 Comment(0)
S
3

One could be constructed from the Unicode Consortium's published CodeCharts.pdf by font extraction via FontForge. However:

  1. Legal issues would be a serious consideration.
  2. The extracted fonts do not align their characters to unicode code points, but rather place them at various points sometimes in order, sometimes haphazardly. Remapping them is a chore (but orders of magnitude easier than creating a font from scratch).
  3. Character combining, etc., logic is complex (I'd personally prefer a dumb uncombined font, with one visual position per codepoint, and display them just like on the codepages).
Shavon answered 25/2, 2009 at 15:35 Comment(0)
N
2

GNU Unifont does indeed have the complete Unicode BMP. unfortunately the UTF8 map has about 16 times as many characters, including some CJK extensions. My advice is to download Unifont and add the other characters you need by hand or by copying them from another font.

Nils answered 25/2, 2009 at 15:35 Comment(0)
T
-2

Actually I find monospaced fonts to be a nuisance when I have to read them so I use Tahoma or even Georgia for my source code. I have a very verbose coding style (an instance of type AstractModemConnector is named abstractModemConnector) so my source code looks almost like English and is perfectly readable with a proportional font.

Tadeo answered 25/2, 2009 at 15:35 Comment(4)
I take it you don't ever use Python? ;) Even when coding other stuff, I just like having my stuff aligned. I use vim mostly, or gvim. I also use Komodo and Eclipse every now and then.Breakup
The language doesn’t matter, indenting with four space characters takes up a certain amount of space, eight characters use double that amount. Unless of course you are implying that Python is very cryptic and having a proportional font is of no use because you can’t read Python fluently anyway. :)Tadeo
Well I find having to read Chinese a nuisance but that's what the question asked for. :-)Zigzagger
I use proportional fonts for Python coding all the time, don't see any problem with it. You'd need spaces to line up if you were doing that style of line-breaking where you try to align with the above opening bracket (or whatever), but that has a whole bunch of other problems too, so best avoided...Refraction

© 2022 - 2024 — McMap. All rights reserved.