DPI Virtualization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DPI Virtualization

marcel.taeumel (old)
The newest Cog VMs seem to send "I know about DPI virtualization" to the operating system. Can this be turned off again via command line parameter? :)

Here is why: MS Windows provides an easy way to turn off automatic scaling for old-style programs so that you can see every pixel again. Seems to be much easier than on MacOS systems. On my Surface, however, I have a high pixel density and prefer the scaling because my Squeak does not have high-resolution icons and fonts etc. Now, with the newest Cog VMs, everything is always too small for me. :-/

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: DPI Virtualization

Eliot Miranda-2
 
Hi Marcel,

On Wed, Oct 15, 2014 at 7:19 AM, Marcel Taeumel <[hidden email]> wrote:

The newest Cog VMs seem to send "I know about DPI virtualization" to the
operating system. Can this be turned off again via command line parameter?
:)

No, but you can simply delete the Squeak.exe.manifest alongside Squeak.exe.  What might work and be even better would be to copy Squeak.exe to e.g. ScaledSqueak.exe, Squeak.ini to ScaledSqueak.ini but /don't/ copy Squeak.exe.manifest to ScaledSqueak.exe.manifest and run ScaledSqueak.exe.  If this works please let me know.

I can easily add this info to a README.

Here is why: MS Windows provides an easy way to turn off automatic scaling
for old-style programs so that you can see every pixel again. Seems to be
much easier than on MacOS systems. On my Surface, however, I have a high
pixel density and prefer the scaling because my Squeak does not have
high-resolution icons and fonts etc. Now, with the newest Cog VMs,
everything is always too small for me. :-/

Best,
Marcel

--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: DPI Virtualization

marcel.taeumel (old)
Thank you! Worked as proposed. :)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: DPI Virtualization

marcel.taeumel (old)
Is there a way to check for this flag within the running image? If we had appropriate fonts and pictures and stuff, we still need that condition to activate them.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: DPI Virtualization

Eliot Miranda-2
 
Hi Marcel,

On Sun, Oct 19, 2014 at 7:21 PM, Marcel Taeumel <[hidden email]> wrote:

Is there a way to check for this flag within the running image? If we had
appropriate fonts and pictures and stuff, we still need that condition to
activate them.

There's no primitive to access it. You could call GetProcessDPIAwareness through the FFI, see http://msdn.microsoft.com/en-us/library/windows/desktop/dn302113(v=vs.85).aspx.  But perhaps this merits a generic vm parameter or primitive?  e.g. DisplayScreen>>isScaled or some such?
--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: DPI Virtualization

Bert Freudenberg
 
A useful primitive would be "getDevicePixelRatio". And possibly a "setDevicePixelRatio". This would let the image control if it wants normal-sized pixels (2x2 on a retina display) or actual device pixels (which would make everything way too small with an old image). 

This is how HTML exposes "retina pixels", which seems like a useful abstraction. You could look there for the spec (I think devicePixelRatio is 2 on retina, 1 otherwise). 

- Bert -


On 19.10.2014, at 20:06, Eliot Miranda <[hidden email]> wrote:

Hi Marcel,

On Sun, Oct 19, 2014 at 7:21 PM, Marcel Taeumel <[hidden email]> wrote:

Is there a way to check for this flag within the running image? If we had
appropriate fonts and pictures and stuff, we still need that condition to
activate them.

There's no primitive to access it. You could call GetProcessDPIAwareness through the FFI, see http://msdn.microsoft.com/en-us/library/windows/desktop/dn302113(v=vs.85).aspx.  But perhaps this merits a generic vm parameter or primitive?  e.g. DisplayScreen>>isScaled or some such?
--
best,
Eliot

smime.p7s (8K) Download Attachment