LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to get text scaling value in C++? (https://www.linuxquestions.org/questions/linux-software-2/how-to-get-text-scaling-value-in-c-4175532855/)

skykooler 02-02-2015 04:56 PM

How to get text scaling value in C++?
 
I am writing a OpenGL application in C++. I recently discovered that UI elements are very small on high-DPI displays. A bit of research indicates that there is a setting for text scaling factor, which scales up UI elements; how can I read this value from C++ to scale my UI?

manu-tm 02-03-2015 07:52 AM

Can you give more details? Which lib do you use for UI? OpenGL version?

pan64 02-03-2015 08:24 AM

I think you can find some good tips here: https://www.opengl.org/discussion_bo...ch-GDI-pt-size

skykooler 02-03-2015 10:16 AM

Quote:

Originally Posted by manu-tm (Post 5311205)
Can you give more details? Which lib do you use for UI? OpenGL version?

I'm not using any libs for UI, it's written in raw OpenGL and uses X for window creation. I'm using OpenGL 3.

Quote:

Originally Posted by pan64 (Post 5311226)
I think you can find some good tips here: https://www.opengl.org/discussion_bo...ch-GDI-pt-size

As far as I can tell, all the answers there are Windows-specific (they use GDI to figure out the text scaling).


All times are GMT -5. The time now is 11:02 PM.