Cosmin Prund wrote:
> That would make sence. Unfortunatelly PixelsPerInch says 96 on both my 
> "normal fonts" developement machine AND on my "Extra Large Fonts" test 
> machine.

PixelsPerInch tells the resolution of the screen on which the form was 
designed. That way, the form will know how much to scale itself by when 
it runs on a different screen.

But there are two PixelsPerInch properties. One belongs to TForm. That's 
no good. The other belongs to TScreen. Use that one to determine the 
font size.

Also note that font size is no longer limited to just "small" and 
"large." Many video drivers allow you to choose a resolution of your 
own; 96 and 120 are common, but you can also find 200, or 126, or 108, 
or any other value. Rather than ask, "Am I in large-font mode?" you need 
to ask, "What font size am I in?" and then do some math to compensate.

You can see how TForm accounds for font size by looking in 
TCustomForm.ReadState, in Forms.pas. It adjusts the font size right 
after its inherited call.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to