Overriding RStudio Desktop's Font Picker

November 18, 2023 at 1 PM

I’ve been doing a decent amount of R programming lately and I’ve wanted to experiment with GitHub’s new Monaspace type family. Once installed, though, only the variable font—er—variants register as fixed-width fonts on macOS. This is a problem because RStudio Desktop (at least as of version 2023.06.1+524) only allows users to select fixed-width fonts in the interface.

RStudio manages most preferences in flat JSON files these days, so I figured I could pick whatever font file I wanted in these JSON files. After some searching, though, RStudio does not store font configuration in the usual places: ~/.local/share/rstudio/ or ~/.config/rstudio/.

Instead, the font setting is stored (on macOS Sonoma, at least) in ~/Library/Application Support/RStudio/config.json. I swapped in font["fixedWidthFont"] = "MonaspaceNeon-Regular", and everything works after an RStudio UI reload.

Related Posts