我想更改我的 matplotlib 默认字体,并且我更喜欢 Ubuntu 默认附带的字体,而无需下载任何字体。
我打印了系统中的字体列表供您参考
/usr/share/fonts/truetype/kacst/KacstBook.ttf
/usr/share/fonts/truetype/lato/Lato-Medium.ttf
/usr/share/fonts/truetype/tlwg/Purisa-Bold.ttf
/usr/share/fonts/truetype/tlwg/Waree-Bold.ttf
/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf
/usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf
/usr/share/fonts/truetype/lato/Lato-MediumItalic.ttf
/usr/share/fonts/truetype/tlwg/Loma-Oblique.ttf
/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-B.ttf
/usr/share/fonts/truetype/font-awesome/fontawesome-webfont.ttf
/usr/share/fonts/truetype/lato/Lato-ThinItalic.ttf
/usr/share/fonts/truetype/kacst/KacstPen.ttf
/usr/share/fonts/truetype/tlwg/Loma.ttf
/usr/share/fonts/truetype/msttcorefonts/georgiai.ttf
/usr/share/fonts/truetype/openoffice/opens___.ttf
/usr/share/fonts/truetype/kacst/mry_KacstQurn.ttf
/usr/share/fonts/truetype/tlwg/Kinnari-Italic.ttf
/usr/share/fonts/truetype/lato/Lato-Semibold.ttf
/usr/share/fonts/truetype/msttcorefonts/courbi.ttf
/usr/share/fonts/truetype/kacst/KacstScreen.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypist-Oblique.ttf
/usr/share/fonts/truetype/msttcorefonts/ariblk.ttf
/usr/share/fonts/truetype/tlwg/Kinnari.ttf
/usr/share/fonts/truetype/kacst/KacstQurn.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-L.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoIt.ttf
/usr/share/fonts/truetype/nanum/NanumGothic.ttf
/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf
/usr/share/fonts/truetype/tlwg/Kinnari-Oblique.ttf
/usr/share/fonts/truetype/tlwg/Garuda-BoldOblique.ttf
/usr/share/fonts/truetype/fonts-japanese-gothic.ttf
/usr/share/fonts/truetype/freefont/FreeMono.ttf
/usr/share/fonts/truetype/tlwg/Purisa.ttf
/usr/share/fonts/truetype/kacst/KacstArt.ttf
/usr/share/fonts/truetype/msttcorefonts/arialbd.ttf
/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/tlwg/Loma-BoldOblique.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypist-BoldOblique.ttf
/usr/share/fonts/truetype/tlwg/Umpush-BoldOblique.ttf
/usr/share/fonts/truetype/freefont/FreeSans.ttf
/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf
/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf
/usr/share/fonts/truetype/tlwg/Kinnari-BoldItalic.ttf
/usr/share/fonts/truetype/kacst/KacstDigital.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-LI.ttf
/usr/share/fonts/truetype/lato/Lato-Light.ttf
/usr/share/fonts/truetype/kacst-one/KacstOne.ttf
/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf
/usr/share/fonts/truetype/tibetan-machine/TibetanMachineUni.ttf
/usr/share/fonts/truetype/tlwg/Norasi-Bold.ttf
/usr/share/fonts/truetype/tlwg/Loma-Bold.ttf
/usr/share/fonts/truetype/ttf-khmeros-core/KhmerOS.ttf
/usr/share/fonts/truetype/tlwg/Norasi-BoldOblique.ttf
/usr/share/fonts/truetype/msttcorefonts/cour.ttf
/usr/share/fonts/truetype/abyssinica/AbyssinicaSIL-R.ttf
/usr/share/fonts/truetype/kacst/KacstPoster.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-MI.ttf
/usr/share/fonts/truetype/tlwg/Garuda-Bold.ttf
/usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf
/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf
/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf
/usr/share/fonts/truetype/tlwg/Laksaman-Italic.ttf
/usr/share/fonts/truetype/lyx/eufm10.ttf
/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
/usr/share/fonts/truetype/tlwg/Sawasdee-BoldOblique.ttf
/usr/share/fonts/truetype/tlwg/TlwgMono-Bold.ttf
/usr/share/fonts/truetype/tlwg/Umpush-Bold.ttf
/usr/share/fonts/truetype/padauk/Padauk.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
/usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-RI.ttf
/usr/share/fonts/truetype/nanum/NanumSquareR.ttf
/usr/share/fonts/truetype/msttcorefonts/andalemo.ttf
/usr/share/fonts/truetype/msttcorefonts/arialbi.ttf
/usr/share/fonts/truetype/liberation/LiberationSans-BoldItalic.ttf
/usr/share/fonts/truetype/msttcorefonts/trebucit.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf
/usr/share/fonts/truetype/lyx/cmr10.ttf
/usr/share/fonts/truetype/msttcorefonts/timesi.ttf
/usr/share/fonts/truetype/tlwg/Purisa-BoldOblique.ttf
/usr/share/fonts/truetype/msttcorefonts/georgia.ttf
/usr/share/fonts/truetype/lato/Lato-HairlineItalic.ttf
/usr/share/fonts/truetype/lato/Lato-Thin.ttf
/usr/share/fonts/truetype/nanum/NanumSquareB.ttf
/usr/share/fonts/truetype/kacst/KacstTitleL.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypewriter-BoldOblique.ttf
/usr/share/fonts/truetype/msttcorefonts/verdanai.ttf
/usr/share/fonts/truetype/tlwg/TlwgMono-Oblique.ttf
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-Regular.ttf
/usr/share/fonts/truetype/freefont/FreeSansBold.ttf
/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf
/usr/share/fonts/truetype/kacst/KacstLetter.ttf
/usr/share/fonts/truetype/msttcorefonts/Andale_Mono.ttf
/usr/share/fonts/truetype/nanum/NanumBarunGothic.ttf
/usr/share/fonts/truetype/lato/Lato-Black.ttf
/usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf
/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf
/usr/share/fonts/truetype/lato/Lato-Heavy.ttf
/usr/share/fonts/truetype/tlwg/Umpush-Light.ttf
/usr/share/fonts/truetype/lato/Lato-Hairline.ttf
/usr/share/fonts/truetype/msttcorefonts/arial.ttf
/usr/share/fonts/truetype/msttcorefonts/comic.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf
/usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf
/usr/share/fonts/truetype/msttcorefonts/timesbi.ttf
/usr/share/fonts/truetype/tlwg/Purisa-Oblique.ttf
/usr/share/fonts/truetype/kacst/KacstDecorative.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypo.ttf
/usr/share/fonts/truetype/lyx/wasy10.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf
/usr/share/fonts/truetype/liberation/LiberationMono-Italic.ttf
/usr/share/fonts/truetype/nanum/NanumMyeongjoBold.ttf
/usr/share/fonts/truetype/nanum/NanumBarunGothicBold.ttf
/usr/share/fonts/truetype/tlwg/Waree-Oblique.ttf
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf
/usr/share/fonts/truetype/lyx/cmsy10.ttf
/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf
/usr/share/fonts/truetype/tlwg/TlwgMono-BoldOblique.ttf
/usr/share/fonts/truetype/tlwg/Waree.ttf
/usr/share/fonts/truetype/lato/Lato-Regular.ttf
/usr/share/fonts/truetype/kacst/KacstTitle.ttf
/usr/share/fonts/truetype/liberation/LiberationSans-Italic.ttf
/usr/share/fonts/truetype/tlwg/Sawasdee.ttf
/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf
/usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf
/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf
/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf
/usr/share/fonts/truetype/sinhala/lklug.ttf
/usr/share/fonts/truetype/msttcorefonts/Impact.ttf
/usr/share/fonts/opentype/font-awesome/FontAwesome.otf
/usr/share/fonts/truetype/lao/Phetsarath_OT.ttf
/usr/share/fonts/truetype/tlwg/Laksaman.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypist-Bold.ttf
/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
/usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf
/usr/share/fonts/truetype/nanum/NanumMyeongjo.ttf
/usr/share/fonts/truetype/msttcorefonts/verdanaz.ttf
/usr/share/fonts/truetype/lyx/rsfs10.ttf
/usr/share/fonts/truetype/fonts-guru-extra/Saab.ttf
/usr/share/fonts/truetype/lato/Lato-BlackItalic.ttf
/usr/share/fonts/truetype/lato/Lato-Italic.ttf
/usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf
/usr/share/fonts/truetype/tlwg/Laksaman-BoldItalic.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf
/usr/share/fonts/truetype/freefont/FreeSerif.ttf
/usr/share/fonts/truetype/tlwg/Norasi-BoldItalic.ttf
/usr/share/fonts/truetype/elusive-icons/elusiveicons-webfont.ttf
/usr/share/fonts/truetype/msttcorefonts/impact.ttf
/usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf
/usr/share/fonts/truetype/lato/Lato-BoldItalic.ttf
/usr/share/fonts/truetype/lyx/msam10.ttf
/usr/share/fonts/truetype/msttcorefonts/courbd.ttf
/usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBd.ttf
/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf
/usr/share/fonts/truetype/lohit-punjabi/Lohit-Punjabi.ttf
/usr/share/fonts/truetype/msttcorefonts/comicbd.ttf
/usr/share/fonts/truetype/liberation/LiberationSerif-Italic.ttf
/usr/share/fonts/truetype/msttcorefonts/trebucbd.ttf
/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf
/usr/share/fonts/truetype/ttf-khmeros-core/KhmerOSsys.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBI.ttf
/usr/share/fonts/truetype/tlwg/Norasi.ttf
/usr/share/fonts/truetype/ancient-scripts/Symbola_hint.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraIt.ttf
/usr/share/fonts/truetype/kacst-one/KacstOne-Bold.ttf
/usr/share/fonts/truetype/tlwg/Garuda-Oblique.ttf
/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
/usr/share/fonts/truetype/tlwg/Sawasdee-Oblique.ttf
/usr/share/fonts/truetype/tlwg/Umpush-LightOblique.ttf
/usr/share/fonts/truetype/liberation/LiberationSerif-BoldItalic.ttf
/usr/share/fonts/truetype/lato/Lato-LightItalic.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf
/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf
/usr/share/fonts/truetype/tlwg/Kinnari-Bold.ttf
/usr/share/fonts/truetype/msttcorefonts/couri.ttf
/usr/share/fonts/truetype/tlwg/Umpush.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypewriter-Oblique.ttf
/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf
/usr/share/fonts/truetype/tlwg/TlwgMono.ttf
/usr/share/fonts/truetype/lyx/msbm10.ttf
/usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf
/usr/share/fonts/truetype/kacst/KacstNaskh.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypist.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypo-Oblique.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypewriter.ttf
/usr/share/fonts/truetype/takao-gothic/TakaoPGothic.ttf
/usr/share/fonts/truetype/lyx/stmary10.ttf
/usr/share/fonts/truetype/msttcorefonts/trebuc.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
/usr/share/fonts/truetype/lyx/esint10.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-BI.ttf
/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf
/usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf
/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf
/usr/share/fonts/truetype/msttcorefonts/ariali.ttf
/usr/share/fonts/truetype/lato/Lato-Bold.ttf
/usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-BoldItalic.ttf
/usr/share/fonts/truetype/tlwg/Sawasdee-Bold.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSe.ttf
/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-BI.ttf
/usr/share/fonts/truetype/padauk/Padauk-book.ttf
/usr/share/fonts/truetype/msttcorefonts/Arial.ttf
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-Italic.ttf
/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf
/usr/share/fonts/truetype/kacst/KacstOffice.ttf
/usr/share/fonts/truetype/liberation/LiberationMono-BoldItalic.ttf
/usr/share/fonts/truetype/tlwg/Kinnari-BoldOblique.ttf
/usr/share/fonts/truetype/msttcorefonts/verdanab.ttf
/usr/share/fonts/truetype/msttcorefonts/georgiab.ttf
/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf
/usr/share/fonts/truetype/msttcorefonts/trebucbi.ttf
/usr/share/fonts/truetype/tlwg/Norasi-Italic.ttf
/usr/share/fonts/truetype/tlwg/Umpush-Oblique.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypo-BoldOblique.ttf
/usr/share/fonts/truetype/msttcorefonts/verdana.ttf
/usr/share/fonts/truetype/tlwg/Waree-BoldOblique.ttf
/usr/share/fonts/truetype/msttcorefonts/times.ttf
/usr/share/fonts/truetype/msttcorefonts/Webdings.ttf
/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf
/usr/share/fonts/truetype/tlwg/Garuda.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSeBd.ttf
/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf
/usr/share/fonts/truetype/padauk/Padauk-bold.ttf
/usr/share/fonts/truetype/lyx/cmmi10.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-C.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
/usr/share/fonts/truetype/msttcorefonts/webdings.ttf
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-Bold.ttf
/usr/share/fonts/truetype/padauk/Padauk-bookbold.ttf
/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBI.ttf
/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-RI.ttf
/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf
/usr/share/fonts/truetype/kacst/KacstFarsi.ttf
/usr/share/fonts/truetype/tlwg/Norasi-Oblique.ttf
/usr/share/fonts/truetype/msttcorefonts/timesbd.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypewriter-Bold.ttf
/usr/share/fonts/truetype/tlwg/Laksaman-Bold.ttf
/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf
/usr/share/fonts/truetype/lyx/cmex10.ttf
/usr/share/fonts/truetype/lato/Lato-HeavyItalic.ttf
/usr/share/fonts/truetype/msttcorefonts/georgiaz.ttf
答案1
我认为默认情况下不会安装任何此类字体,除非您在安装程序中选择 Hindi 作为语言。但您可以安装fonts-deva
。
sudo apt install fonts-deva