green diod
green diod

Reputation: 1499

rstudio How to enable font ligatures in RStudio?

I looked at Fira Code and I wanted to try it out with one of the listed supported editors. So I launched RStudio (Version 0.99.491 on a Win box) and set the font to Fira Code but ... nothing. So how to enable font ligatures in RStudio?

EDIT: The trick in the accepted answer below still works for RStudio Version 1.0.44. I still wish there's a simple button to enable it.

Upvotes: 10

Views: 3778

Answers (3)

msjahid
msjahid

Reputation: 66

If you are using Debian based os then type in your Terminal,

sudo apt install fonts-firacode 

Restart Rstudio then in Tools / Appearance / Editor Font: choose Fira Code and Apply.

Upvotes: 0

Losses Don
Losses Don

Reputation: 983

RStudio now have a build in option for ligatures, you do not need these dirty hack any more, cheers!


[OLD CONTENTS]

  • Close RStudio
  • Open [RStudio dir]/www/index.htm (If you are using a Linux distribution, the dir may be /usr/lib/rstudio, thanks for the comment of @CosminSaveanu)
  • Add following code between <head> and </head>:

    <style>*{text-rendering: optimizeLegibility;}</style>

  • Restart your RStudio.

dirty but works.

Upvotes: 8

Jonathan
Jonathan

Reputation: 8822

I still wish there's a simple button to enable it.

Wish granted! We've just added this to RStudio 1.1.

You can try the preview release here:

https://www.rstudio.com/products/rstudio/download/preview/

Upvotes: 11

Related Questions