macos - 如何在 RStudio 中安装新字体?

标签 macos fonts rstudio

我想在 RStudio 中安装新字体。
更具体地说,我在办公室 (Windows) 和家里 (OS X) 使用 RStudio,但我发现字体不同,我需要一段时间才能习惯。

有人可以建议如何在 Mac 的 RStudio 中安装 SAS 等宽字体吗?
(我在此处和 Google 中进行了搜索,但没有找到问题的答案。)

先感谢您!

最佳答案

我在 Windows 上遇到了类似的问题,我想使用我安装的新字体 mononoki 字体。我找不到更改选项,所以我查看了 RStudio 源代码,发现对于 RStudio 的桌面版本,RStudio 会自动从操作系统加载字体。它应该在 MAC 上以相同的方式工作。

你所要做的就是:

1.Install your font as usual for your OS
2.Then restart RStudio
3.The new font appears in the Editor Fonts pull down menu 
   (navigation: Global Options -->Appearance --> Editor Fonts)
4.Select the font from Editor Fonts pulldown menu.(Your Done!)

这里是 code它从 RStudio 加载字体。如您所见,它会自动加载比例和固定字体。 RStudio 的 Web 版本将字体选择限制为仅几种字体。
 static class DesktopThemeFontLoader implements ThemeFontLoader
   {
      public native final String getProportionalFont() /*-{
         return $wnd.desktop.proportionalFont();
      }-*/;

      public native final String getFixedWidthFont() /*-{
         return $wnd.desktop.fixedWidthFont();
      }-*/;
   }

关于macos - 如何在 RStudio 中安装新字体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25512367/

相关文章:

c# - 有没有一种简单的方法来确定用户标题栏中使用的字体?

rstudio 颜色外观,包名称的特定颜色,front::

java - Mac 上的临时文件夹和文件#getCanonicalFile()

macos - 需要 Apple launch.h api 的文档

text - jTabbedPane 设置事件标签文本属性

R -Markdown for { } 大括号

r - 动态库未在 R 二进制包构建中加载

ruby-on-rails - Rails : Psych, 从 0.1.4 更新 libyaml

java - 在 MacOS Mojave 上安装 pymssql 时出现问题

iphone - 我们如何更改表格 View 标题的字体?