# 【迁移】R解决导出PDF时的字体问题

Last updated on March 19, 2024 pm

## 安装包

- conda activate clusterprofiler
- conda install -c conda-forge r-sysfonts -y
- conda install -c conda-forge r-showtext -y

## 绘图

    1
    2
    3
    4
    5
    6
    7

    sysfonts::font_add("Arial Narrow", "~/font/Arial Narrow.ttf") # 添加字体
    sysfonts::font_families() # 检查是否添加成功
    {pdf(file = 'B_bnCov.plot.pdf', width = 12, height = 12)
     showtext::showtext_begin()
     print(bnCov$plot)
     showtext::showtext_end()
    dev.off()}

#R #fonts
【迁移】R解决导出PDF时的字体问题
https://hexo.limour.top/R-jie-jue-dao-chu-PDF-shi-de-zi-ti-wen-ti
Author
Limour
Posted on
September 13, 2022
Updated on
March 19, 2024
Licensed under
【迁移】使用 JTK_CYCLE 算法分析生物节律 Previous
【迁移】使用MICE包对数据缺失值进行插补 Next

#### Search

Keyword