뭉근 : 느긋하게 타는 불

Rstudio 3.3.0을 깔고 실행했더니

아래 그림과 같이 폰트 사이즈나 리소스 크기 등이 굉장히 불편하게 되어 있었다.

   

   

처음엔 Rstudio 버그인가 싶어서 resolution, window size, resource bug 등의 키워드로 검색해보았는데 대부분 plot 부분의 resolution을 처리하는 방법에 대한 문서들만 나왔다. 문득 떠오른 생각이 Rstduio 설치 할 때 QT 라이브러리도 같이 설치했던 기억이 나서 이 문제인가 싶어서 검색해보았더니 QT의 high resolution 지원으로 인한 스케일링 문제인 것으로 알 수 있었다. 몇 번의 검색 시도 끝에 다음과 같은 해결 방법이 있는 문서를 찾았다.

   

Qt fully supports high DPI monitors from Qt 5.6 onward, via attribute or environment variable (except on OS X where support is native). For the attribute method, use:

#include <QApplication>

int main(int argc, char *argv[])
{
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support

QApplication app(argc, argv);
return app.exec();
}

or set the system environment variable:

QT_AUTO_SCREEN_SCALE_FACTOR=1

I've tested both methods on windows 10 with a high-DPI surfacebook monitor and the results are scaled properly as expected.

   

출처: <http://stackoverflow.com/questions/24367355/automatic-rescaling-of-an-application-on-high-dpi-windows-platform>

   

시스템 환경변수에서 저 부분을 변경하려고 들어갔더니 QT_DEVICE_PIXEL_RATIO가 2로 설정되어 있었다. 뜻을 보니 딱 스케일링 관련 환경 변수같아서 다음과 같이 1로 설정하였더니 문제가 해결되었다.

   

   

아래는 잘 실행되는 Rstudio이다

   

   

- 요약

시스템 환경 변수의 QT_DEVICE_PIXEL_RATIO 값을 확인하여 1이 아닌 값으로 되어 있을 경우 1로 변경

* QHD, UHD 등이 고해상도 환경에서는 이 부분의 배율을 조정하여 눈에 편하게 볼 수 있을 것 같다.

'프로그래밍' 카테고리의 다른 글

PsSetCreateProcessNotifyRoutineEx 접근 권한 문제  (1) 2016.05.10
드라이버 개발 삽질 #1  (0) 2015.03.12
ofstream 한글 출력 문제  (0) 2014.10.22
ifstream 64  (0) 2014.09.25
CPP 벡터 반복문 중 원소 지우기  (0) 2014.09.22