Free monospace font for 𝐀 etc



I am looking for a free monospace font that supports the Unicode chars starting at #x1D400, eg 𝐀 (\bfA). I am using Iosevka for my main font in Emacs, just need it as a fallback for chars which are not available.


DejaVu Sans Mono has them.

Edit: for the record, my mistake here arose from the fact that when one specifies a font in the Gnome character map application, it defaults to showing glyphs from other fonts.


I don’t think so, at least version 2.37-1 (Ubuntu package) doesn’t (that glyph is empty). Where did you get yours?


That’s strange; I have fonts-dejavu-core and fonts-dejavu-extra 2.37-1 on Debian and they look fine here.
Do you also have the -extra package?


What are you using to determine that? Could be a fallback.

If you open /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf in eg fontforge, the glyph for #x1D400 is empty, and the same for almost all codepoints in the block.

In Emacs, use M-x describe-char to see which font provided the fallback.


I think you’re right, although it looks like an extension rather than a fallback: emacs says

xft:-unknown-DejaVu Math TeX Gyre-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1 (#x1EA)

which presumably comes from the fonts-texgyre package.


Yes, that’s the default fallback (see M-x describe-fontset fontset-default). I am using DejaVu Serif as a fallback instead, which is also proportional but is more condensed.

Monospace support for Mathematical Alphanumeric Symbols seems to be nonexistent (apart from some low-quality fonts and GNU Unifont, which is a bitmap font).

I thought that Julia programmers are most likely to use these characters, which is why I asked here.


Doing Math symbols in a monospaced font is hard, even commercial fonts don’t have this option.


Possibly, but also the lack of demand (programming languages which allow a lot of Unicode in code). Julia is, again, ahead of most of the crowd here.

This is just a minor issue though, stuff does not align but I can live with this.


I’m using D2coding for my editor.
It includes korean, english +additional 332 letters.


Not sure why you suggested this font, as it does not seem to have any glyphs in the U+1D400–U+1D7FF range.


I can find only a few fonts that have these characters (at least according to the handy UltraCharacterMap app.)

Asana and Stix look like good bets.

(I tried to get these output via Cairo.jl, but didn’t succeed, not sure why I can’t…)


Can you provide example code?


Yes, I’ll do that later today. I’ll try both the Toy API and the β€œother” API this time.


using Cairo

c = CairoRGBSurface(256,256)
cr = CairoContext(c)

set_source_rgb(cr,0.8,0.8,0.8)    # light gray
rectangle(cr,0.0,0.0,256.0,256.0) # background

# Toy API
select_font_face(cr, "Sans", Cairo.FONT_SLANT_NORMAL, Cairo.FONT_WEIGHT_BOLD)
#select_font_face(cr, "Asana-Math", Cairo.FONT_SLANT_NORMAL, Cairo.FONT_WEIGHT_BOLD)
set_font_size(cr, 30.0)
move_to(cr, 10.0, 110.0)
show_text(cr, string("1> ", Char(0x203d)))
move_to(cr, 10.0, 150.0)
show_text(cr, string("2> ", Char(0x1D400)))

# 'pro' API
set_font_face(cr, "Sans 16")
set_font_face(cr, "Asana-Math 16")
Cairo.text(cr, 100.0, 110.0, string("3> ", Char(0x203d)))
Cairo.text(cr, 100.0, 150.0, string("4> ", Char(0x1D400)))
Cairo.text(cr, 100.0, 180.0, "5> 𝐀")

write_to_png(c, "/tmp/sample_text.png")


Yet another edit

Wait, it works if I specify the font name differently, not using its PostScript name (β€œAsana Math”). I wish I understood it all… Β―\_(ツ)_/Β― :slight_smile:


I was about to write that. Your example looks like the interfaces work, but you miss to address the correct font. In the simple interface it looks like 203d is found and displayed, in the pango text the missing 1d400 is replaced by id-tag.

Finding fonts by name or similar is a nightmare on every architecture.

But i read you correctly: Asana Math contains the 1d400?


Yes, using the β€œpro” API I could draw those characters specifying the correct font β€œAsana Math”:


The β€œtoy” API draws 203d only if I specify β€œAsanaMath”. :slight_smile:


You could raise a question like this on the!forum/googlefonts-discuss
Google tries/tried hard to achieve good unicode coverage on the fonts they support, maybe you raise some interest by a designer to work on that.


Great idea, I posted there and will link it here once it clears moderation.


I have Symbola as a fallback, it does 𝐀 (\bfA) just fine. I also need to set a wide letter space to see them.