我想在 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/