Re: [Lazarus] Detecting anomalous DPI

2017-02-25 Thread Mark Morgan Lloyd via Lazarus

On 25/02/17 18:30, Ondrej Pokorny via Lazarus wrote:

On 25.02.2017 16:16, Mark Morgan Lloyd via Lazarus wrote:> But it would
be very useful if a program could log the /actual/ DPI > for support
purposes.
You have these properties: TScreen.PixelsPerInch and
TMonitor.PixelsPerInch. You surely can log them.
Ondrej--


As I said in my original note, Screen.PixelsPerInch returns the nominal 
DPI not the override. I don't see TMonitor.PixelsPerInch documented.


So I've got a test system in front of me where the "Force fonts DPI" is 
set to 108 but Screen.PixelsPerInch still returns 96 as does 
GetDeviceCaps(dc, LOGPIXELSX).


The only thing I've found so far that does appear to vary predictably is 
the ascent and descent returned by GetTextMetrics, but I think that 
describes the fount that has been selected since it doesn't have a 
linear relationship to the DPI.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Detecting anomalous DPI

2017-02-25 Thread Ondrej Pokorny via Lazarus

On 25.02.2017 16:16, Mark Morgan Lloyd via Lazarus wrote:
But it would be very useful if a program could log the /actual/ DPI 
for support purposes.


You have these properties: TScreen.PixelsPerInch and 
TMonitor.PixelsPerInch. You surely can log them.


Ondrej
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus