Home » U++ Library support » RichText,QTF,RTF... » Using Qtf forgets control font
Re: Using Qtf forgets control font [message #17853 is a reply to message #17849] |
Sun, 31 August 2008 13:39   |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Sun, 31 August 2008 11:46 | Sorry, "FontZoom" is "general term". The methods are
The idea behind this is that there is some basic font size. All dialog layouts are designed with this basic font size in mind - and these are units shown in layout designer.
Then there is "GetZoomText" - a standard text whose size is known in basic font size (by basic font we consider here the "normal font" used for most texts in GUI).
Then, when U++ app is started, the same text is measured in host platform "normal GUI font" and this new size / "standard size" is taken as "FontZoom ratio".
This is the best solution I was able to invent... In practice, it works pretty well.
|
OK, basically you have Csize where you get the current size using StdFont of the zoom text, and Dsize, which is initialized with a hardcoded measurement of the same text and same font under what you consider zoom 1:1 zoom ration. And you use their ration to adjust positions.
Then you must know what which font StdFont() is .
I also noticed that max between Csize and Dsize. This probably explains why when I lowered my PPI and I go really small text, the layout was not shrunk, but when I increase PPI, layouts grow..
Quote: |
I had to deprecate ScreenInfo, as it is inherently MT unsafe...
You should be able to get the same thing using
ScreenDraw info(true);
|
ScreenDraw worked fine. Thank you! Actually, I was getting the assert because I used PromptOK in a Paint method. I shouldn't have done that.
Can I use ScreenDraw to draw on the screen as with Win API GetDC(0)? If yes, then probably I should extract the info I need at application startup and then discard the ScreenDraw instance.
I think I have everything that I need to add HeightPt() and GetHeightPt() to Font.
Also, except font antialiasing, is there any other missing tag from Qtf that is present in a font description?
[Updated on: Thu, 04 September 2008 05:03] Report message to a moderator
|
|
|
 |
|
Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Mon, 07 July 2008 15:30
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Mon, 07 July 2008 22:51
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: zsolt on Tue, 08 July 2008 14:38
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Sat, 30 August 2008 14:05
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Sat, 30 August 2008 14:53
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Sun, 31 August 2008 10:46
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Sun, 31 August 2008 10:51
|
 |
|
Re: Using Qtf forgets control font
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Mon, 01 September 2008 13:37
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Mon, 01 September 2008 14:46
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Thu, 04 September 2008 05:08
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Sun, 07 September 2008 13:35
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Sun, 07 September 2008 14:08
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Sun, 07 September 2008 20:47
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Tue, 09 September 2008 02:15
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Tue, 09 September 2008 03:14
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Tue, 09 September 2008 08:53
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Wed, 10 September 2008 06:07
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Wed, 10 September 2008 08:08
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Wed, 10 September 2008 20:46
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Wed, 10 September 2008 21:27
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Wed, 10 September 2008 22:02
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Thu, 11 September 2008 06:56
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Fri, 12 September 2008 08:25
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Fri, 12 September 2008 11:15
|
 |
|
Re: Using Qtf forgets control font
By: mirek on Fri, 12 September 2008 17:00
|
 |
|
Re: Using Qtf forgets control font
By: cbpporter on Sat, 13 September 2008 19:19
|
Goto Forum:
Current Time: Tue Jun 17 00:28:39 CEST 2025
Total time taken to generate the page: 0.04573 seconds
|