更新操作系统后,字体在我的Rstudio中消失了,尤其是我需要ggolot2的 Courier 。
要解决我安装的问题:
library(extrafont)
然后:
font_import()
现在我有几种字体,但是它们大多不受欢迎。例如:
fonts()
"aakar" "Abyssinica SIL" "Ani" "AnjaliOldLipi" "Chilanka" "DejaVu Sans"
"DejaVu Sans Mono" "DejaVu Serif" "Droid Sans Fallback" "Dyuthi"
如何安装我需要的Courier字体?
我跑步:
答案 0 :(得分:0)
只需将样式添加到.Rmd文件中的yaml定义中,如下所示:
---
title: "R Notebook"
output:
html_document:
css: style.css
---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
然后在同一文件夹中创建一个style.css
文件并粘贴以下代码:
body{
font-family: "Courier New", Courier, monospace;
font-size: 16pt;
}
然后重新编织,它将起作用。
如果您的Ubuntu系统中没有Courier字体,则可以通过here
进行安装。