Skip to content

Instantly share code, notes, and snippets.

@rogerleite
Last active November 1, 2024 18:08
Show Gist options
  • Save rogerleite/99819 to your computer and use it in GitHub Desktop.
Save rogerleite/99819 to your computer and use it in GitHub Desktop.
Install Monaco font in Linux
#!/bin/bash
# Install Monaco font in Linux
# Version from nullvideo https://gist.github.com/rogerleite/99819#gistcomment-2799386
sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \
sudo wget https://gist.github.com/rogerleite/b50866eb7f7b5950da01ae8927c5bd61/raw/862b6c9437f534d5899e4e68d60f9bf22f356312/mfont.ttf -O - > \
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \
sudo fc-cache
@ArtoNiittukari
Copy link

Thanks!

@astro-stan
Copy link

astro-stan commented Oct 21, 2018

Thanks!

P.S. I suggest changing this:

cd /usr/share/fonts/truetype/

#TODO: put validation if folder already exists
sudo mkdir ttf-monaco

cd ttf-monaco/

To this:

sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco
cd /usr/share/fonts/truetype/ttf-monaco

@AndrianD
Copy link

AndrianD commented Dec 1, 2018

Great work! Thank you very much. The script is still working on Ubuntu 18

@tripulse
Copy link

tripulse commented Jan 2, 2019

The entire script could be written in one line like this!

sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \
sudo wget http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf -O - > \
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \
sudo fc-cache

@corfucius
Copy link

Thank you! It shouldn't matter but I've really missed this font. It is working on Fedora 29, just had to make a directory for truetype.

@aditya777hp
Copy link

The entire script could be written in one line like this!

sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \
sudo wget http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf -O - > \
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \
sudo fc-cache

good

@LuaGanrqunx
Copy link

Many thanks!!

@rogerleite
Copy link
Author

I totally forgot about this gist and I didn't know it was so popular!
Amazing!
@SlavDimov sorry I didn't see your suggestion.

@nullvideo thanks for the one-line script, I applied your suggestion.

@wilitp
Copy link

wilitp commented Jan 2, 2020

Hey, wget is throwing a 404. Do you have other source?

@rogerleite
Copy link
Author

@wilitp try the new url please

@alexanderpoilov
Copy link

thanks !!!

@Sparksss
Copy link

Sparksss commented Aug 9, 2020

Thanks)))

@Leedehai
Copy link

There is an issue with this Monaco_Linux.ttf file.. On Ubuntu, in some applications (VSCode the editor, Chrome the browser), the font is pixelated when font size is 14 (other sizes like 14.5 is fine), and in others (Tilix the terminal emulator) the font is fine.

One proposed solution is disabling the embedded bit map: https://askubuntu.com/questions/386056/monaco-is-pixelated-in-web-pages, but it doesn't work for me.

I finally solved the issue by downloading the Monaco.ttf file from this source: https://www.fontpalace.com/font-download/monaco/ (note: I'm not sure if it's safe, though). Then, move thie file to /usr/share/fonts/truetype/ttf-monaco/ as suggested by the author here, then run sudo fc-cache -f -v . in that directory to make the font effective. You may need to restart the applications to see the change.

@cangelis
Copy link

There is an issue with this Monaco_Linux.ttf file.. On Ubuntu, in some applications (VSCode the editor, Chrome the browser), the font is pixelated when font size is 14 (other sizes like 14.5 is fine), and in others (Tilix the terminal emulator) the font is fine.

One proposed solution is disabling the embedded bit map: https://askubuntu.com/questions/386056/monaco-is-pixelated-in-web-pages, but it doesn't work for me.

I finally solved the issue by downloading the Monaco.ttf file from this source: https://www.fontpalace.com/font-download/monaco/ (note: I'm not sure if it's safe, though). Then, move thie file to /usr/share/fonts/truetype/ttf-monaco/ as suggested by the author here, then run sudo fc-cache -f -v . in that directory to make the font effective. You may need to restart the applications to see the change.

Thanks. This worked for me too.

@fideo
Copy link

fideo commented Sep 28, 2021

Thanks!!!

@stormeyes
Copy link

It works on my manjaro 21. Good!

@vdegenne
Copy link

vdegenne commented May 5, 2023

There is an issue with this Monaco_Linux.ttf file.. On Ubuntu, in some applications (VSCode the editor, Chrome the browser), the font is pixelated when font size is 14 (other sizes like 14.5 is fine), and in others (Tilix the terminal emulator) the font is fine.

One proposed solution is disabling the embedded bit map: https://askubuntu.com/questions/386056/monaco-is-pixelated-in-web-pages, but it doesn't work for me.

I finally solved the issue by downloading the Monaco.ttf file from this source: https://www.fontpalace.com/font-download/monaco/ (note: I'm not sure if it's safe, though). Then, move thie file to /usr/share/fonts/truetype/ttf-monaco/ as suggested by the author here, then run sudo fc-cache -f -v . in that directory to make the font effective. You may need to restart the applications to see the change.

It might actually be better to download from your url because the font contains copyright. But the font provided by the OP copyright is removed which is kinda sus.

@gapormann
Copy link

Thanks!!!
It works on Ubuntu 24.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment