Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
wget -O /tmp/YaHei.Consolas.1.12.zip https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uigroupcode/YaHei.Consolas.1.12.zip
unzip /tmp/YaHei.Consolas.1.12.zip
sudo mkdir -p /usr/share/fonts/consolas
sudo mv YaHei.Consolas.1.12.ttf /usr/share/fonts/consolas/
sudo chmod 644 /usr/share/fonts/consolas/YaHei.Consolas.1.12.ttf
cd /usr/share/fonts/consolas
sudo mkfontscale && sudo mkfontdir && sudo fc-cache -fv
@LarsHLunde
Copy link

Tested on Debian 10 22.05.2020
Works great !
Thank you

@VahidSafari
Copy link

Thanks!
Tested on Ubuntu 20.04 LTS

@TheTajinMan
Copy link

Tried it in Linux Mint 19.3 and it worked perfectly fine! thank you very much

@darkguy2008
Copy link

This works great, thanks so much!

@AcuteSyntax
Copy link

Still works as of September, thanks!

@LarsHLunde
Copy link

This is the stranges and most wholesome little gist 👍

@yilinbp
Copy link

yilinbp commented Oct 20, 2020

Still works as of September, thanks!

Hi, I have downloaded with the commands above,
How can I implement in Ubuntu?
Could you please help me?
Thanks in advance !

@rulon
Copy link

rulon commented Oct 30, 2020

Still works as of September, thanks!

Hi, I have downloaded with the commands above,
How can I implement in Ubuntu?
Could you please help me?
Thanks in advance !

try this:
https://linuxconfig.org/how-to-install-fonts-on-ubuntu-20-04-focal-fossa-linux

@cobusLee
Copy link

Thanks, It works well on Linux Mint 20 Ulyana!!

Copy link

ghost commented Dec 17, 2020

How can I add this to Visual Studio Code.. "Consolas" is not working.

@gilpabu
Copy link

gilpabu commented Jan 7, 2021

it works on Oracle Linux 7 thanks!

@ppalone
Copy link

ppalone commented Feb 16, 2021

How can I add this to Visual Studio Code.. "Consolas" is not working.

Try adding "YaHei Consolas Hybrid"

@ZP-Z
Copy link

ZP-Z commented Mar 22, 2021

How can I add this to Visual Studio Code.. "Consolas" is not working.

Try adding "YaHei Consolas Hybrid"

nICe !!!!

@jonardcaguioa
Copy link

thank you so much~

@jonardcaguioa
Copy link

how can i add consolas to python fpdf font ?

@100Mbps
Copy link

100Mbps commented Jul 1, 2021

thank you very much.Tested on
Linux work 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@emillynge
Copy link

Also, to use as a fallback font for Consolas create this font config file:

~/.config/fontconfig/conf.d/20-consolas.conf
------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <description>USe Yahei Consolas when Consolas is requested</description>

  <match target="pattern">
  <test qual="any" name="family"><string>Consolas</string></test>
  <edit name="family" mode="assign" binding="same"><string>YaHei Consolas Hybrid</string></edit>
</match>
</fontconfig>

@wajihullahbaig
Copy link

Works 20.04 as of today :)

@AbdelhamidAITMHID
Copy link

Tested on Ubuntu 20.10 LTS
Works well
Thank you

@RahulLooserR
Copy link

Thank you

@andrey-zakharov
Copy link

image
broken cyrillic

@DarkRoku12
Copy link

Tested in Zorin OS 16, works great!

@aaron-nuy
Copy link

Works on Manjaro Xfce

@JomenkoXD
Copy link

Thank you a lot!
Still works.

@ALEX-YRDM
Copy link

Still work on ubuntu20.04
Sep,2022

@onatkarabulut
Copy link

Tested on Ubuntu 22.04.02 LTS
works perfectly!

@Preet-Sojitra
Copy link

How can I add this to Visual Studio Code.. "Consolas" is not working.

Try adding "YaHei Consolas Hybrid"

Worked even in 2023!! Thanks ❤️

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