Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm a professional programmer. I know quite a bit about computers. I don't claim to be the smartest guy in the room but I'm no dummy.

And I have no idea how to install a font. I download the zip and open it and there are 43 (43!) ttf files. I can install them by double clicking the file and selecting Install Font.

But then what? I now have 43 new fonts, but how do I know which one to use in my editor? Can someone explain this for a dummy?



To install multiple fonts on Arch and Ubuntu I just copy them into `~/.fonts` and run `fc-cache -v`.

edit: On OS X the directory is `~/Library/Fonts`.


What editor are you using?

In Emacs, put this in the .emacs file to set up the default font at startup.

(set-face-attribute 'default nil :family "Source Code Pro" :height 110)


I use Vim, but my question is which of the 43 fonts do I want to use?


You will probably have to set the terminal font and not Vim's.

In any case, usually when there are various ttf files for a single font, they all belong to a Font and then have variations (Medium, Medium Italic, Condensed, etc) Depending on the software, it maybe presented with 43 different fonts, or one single font, with variations (On mac, if you open Font Book, you get the font name, then you can expand to the variation, don't remember how it works on Windows)


So which variation do I want? I use MacVim which gives me a font selector that you select the variation.


For gVim I put this in my .vimrc:

    set guifont=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11


See, that makes no sense to me. Is the font named "Source Code Pro" or "Source Code Pro for Powerline"? And if I'm using a different font, how do I know what it's name is? For example, is M+ named "M+", "M +", M+ for Powerline" or what exactly?


Yeah, I can see where one could get confused. I use a version of Source Code Pro that's been patched to work with vim-airline[0], which is why it's "for Powerline". On OS X I think you can get the font name from the "Family" column of the Fonts pane, or via Quick Look in the Finder.

[0]: https://github.com/bling/vim-airline




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: