Font is giant in latest update (1.2.5001)

I recently updated to RStudio version 1.2.5001. Now everything appears to be in 2x scaling on my 4K monitor. This is probably desired for some people, especially those with 4K displays on their small laptops, but it's obnoxiously large on a big monitor, and I like being able to see more of my code at once. I could switch it to 50% scaling in the Global Options, but that doesn't change the UI size, and it would mean that I would have to constantly switch it back and forth between 50% and 100% scaling when I connect or disconnect my laptop to/from my monitor. Is there a way to force RStudio to stay at 1x scaling? I can't seem to find the setting for it.

This is on Ubuntu 18.04 LTS

You can try launching RStudio with an explicit scale factor:

QT_SCALE_FACTOR=1 /usr/lib/rstudio/bin/rstudio

Depending on your operating system, there should be ways to ensure that applications are launched with certain required environment variables set.

That doesn't seem to change the scaling. I also get the following error message: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Setting that throws an error.

I also tried checking ~/.config/RStudio/desktop.ini, and line 3 says view.zoomLevel=1.0 which would imply that it's set to 100% scaling, which obviously isn't the case.

Here's what it looks like right now:

Here's another screenshot to compare how RStudio looks on each display (top is monitor, bottom is laptop screen). The scaling makes it so the smaller and lower resolution laptop screen can fit more lines of code than the larger monitor:

It would be helpful to know a few more things:

  1. What if you use only the laptop display (without the external display) -- does RStudio scale as you expect?

  2. What if you use only the external display (e.g. with the laptop displayed closed) -- does RStudio scale as you expect?

Scaling is as expected on my laptop display, whether it's connected to the monitor or not. When it is connected, moving an RStudio window back and forth between my laptop display and external monitor changes the scaling depending on which display it's on. Turning off my laptop's internal display and just using the external monitor doesn't change anything--scaling is still at 2x (just for RStudio, not for any other applications).

Interesting -- I wonder why other applications do not scale, but RStudio does.

There are some other environment variables that you might try setting that control how RStudio does UI scaling:

QT_DEVICE_PIXEL_RATIO=1 /usr/lib/rstudio/bin/rstudio
QT_AUTO_SCREEN_SCALE_FACTOR=0 /usr/lib/rstudio/bin/rstudio

Do these make any difference?

1 Like

Thanks, Kevin. The second command worked. I'm guessing that once I set that in .profile it should stay permanent.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.