Friday, December 6, 2013

Fixing the blurry R fonts caused by DPI scaling on Windows 7

R does not play well with high DPI scaling on Windows 7.  Fonts look blurry on my 27 inch WHDQ monitor with 150% DPI scaling.  Fixing that for 32-bit R was easy.  Go to the properties of C:\Program Files\R\R-3.0.2\bin\i386\Rgui.exe. Note, you may need to replace the R version number in that path. Then open the "Compatibility" tab check the box "Disable display scaling on high DPI settings" and you are done. Once you try to do the same for 64-bit counterpart C:\Program Files\R\R-3.0.2\bin\x64\Rgui.exe you'll see the grayed out check box that can not be altered. The solutions requires editing the registry and is described here
http://superuser.com/questions/355915/vista-dpi-scaling-cannot-disable-dpi-scaling-for-wireshark/355953#355953?s=97656833-4e08-4a55-8773-1fe68b5fca77
Brief instructons.
Go to
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Most likely you'll already see a setting for 32-bit Rgui.exe
Make a similar one by right clicking on the "Layer" and add new string value.
Name: C:\Program Files\R\R-3.0.2\bin\x64\Rgui.exe
Type: REG_SZ
Data: HIGHDPIAWARE

No comments:

Post a Comment

Checking font availability on Mac   fc-list : family | grep "Fira Code"   or   system_profiler -json SPFontsDataType | grep \...