LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2015, 05:56 PM   #1
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 95

Rep: Reputation: 17
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?
 
Old 02-03-2015, 08:52 AM   #2
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343

Rep: Reputation: 43
Can you give more details? Which lib do you use for UI? OpenGL version?
 
Old 02-03-2015, 09:24 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,716

Rep: Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827Reputation: 7827
I think you can find some good tips here: https://www.opengl.org/discussion_bo...ch-GDI-pt-size
 
Old 02-03-2015, 11:16 AM   #4
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 95

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by manu-tm View Post
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 View Post
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).
 
  


Reply

Tags
c++, opengl, scaling


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wine and Scaling adamc Linux - Software 3 07-29-2013 03:06 AM
[SOLVED] Bash command to 'cut' text into another text file & modifying text. velgasius Programming 4 10-17-2011 05:55 AM
Scaling grep int0x80 Linux - General 6 02-12-2009 11:08 AM
CPU Scaling toasty_ghosty Slackware 18 09-20-2007 09:19 PM
scaling the display in X nowonmai Linux - Software 3 02-06-2004 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration