Ligatures In RStudio Dailies
2023-11-12 17:11:57 Author: securityboulevard.com(查看原文) 阅读量:9 收藏

I had thought most folks likely knew this already, but if you are user of RStudio dailies (this may apply to regular RStudio, but I only use the dailies) and are missing ligatures in the editor (for some fonts), the “fix” is pretty simple (some misguided folks think ligatures are daft).

RStudio, like VS Code and many other editors/apps, is just a special purpose web browser. That means ligatures are controlled via CSS. RStudio also supports themes. There are many built-in themes. I use this third-party one. We can use these themes to sneak in some CSS that gives you granular control over ligatures.

The CSS class we need to target is .ace_scroller. That’s the contents of the editor pane, console, and any other monospaced “scrolled text” components. If you’re wondering, “Why …ace…?”_, that’s die to RStudio’s use of the Ace editor component. Say all the nice things you want to about the Monaco editor component used by VS Code (et al.), but the wizards at Posit wield Ace better than I’ve seen any other app dev team.

You can start here to learn about all the ways you can, and, may need to customize ligatures, but the following worked for [my new fav font family(https://github.com/githubnext/monaspace):

.ace_scroller {
  font-variant-ligatures: discretionary-ligatures;
  font-feature-settings: "dlig" 1;
}

There are many possible values for font-variant-ligatures, and you can fully customize the font-feature-settings to target only the ligatures you want (for example, the previous linked font has eight stylistic sets).

FIN

If you were missing out before, hopefully this brings you back into the ligature fold.

DevOps Unbound Podcast

The post Ligatures In RStudio Dailies appeared first on rud.is.

*** This is a Security Bloggers Network syndicated blog from rud.is authored by hrbrmstr. Read the original post at: https://rud.is/b/2023/11/12/ligatures-in-rstudio-dailies/


文章来源: https://securityboulevard.com/2023/11/ligatures-in-rstudio-dailies/
如有侵权请联系:admin#unsafe.sh