Re: [python-win32] Fonts behaving differently with Py3/216

2011-03-04 Thread Tim Roberts
Greg Ewing wrote:
 I recently tried running PyGUI on Python 3 using
 pywin32 build 216, and a couple of things are
 not working quite the same way as they were with
 Python 2 and build 213.

 1) The default font used for control labels etc.
 is slightly smaller.

 2) When I calculate the width of a piece of text
 using DC.GetTextExtent() I get a value that is
 too small, and doesn't match the actual size of
 the text as it is drawn.

 Anyone have any idea what might have changed,
 and what I can do about it?

Are you running this on a different computer?  The default font and the
size of a dialog unit is based on the dots-per-inch resolution of the
monitor on that computer.  If you have a machine with a big screen where
the user has chosen a different resolution, that will affect the size of
everything in a dialog.

This is the same problem we used to refer to as small fonts / large fonts.

-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Fonts behaving differently with Py3/216

2011-03-04 Thread Greg Ewing

Tim Roberts wrote:


Are you running this on a different computer?


No, it's the same computer. I can run 2.x and 3.x versions
of the same test side by side, and the 2.x one has normal
sized text whereas the 3.x one has tiny text.

Oddly, it only seems to affect text drawn by the standard
win32 controls. Text that I draw myself using GDI+ comes
out the same size in both cases. So it looks like GDI
and GDI+ are doing different things with the fonts,
somehow.

--
Greg
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Fonts behaving differently with Py3/216

2011-03-03 Thread Greg Ewing

I recently tried running PyGUI on Python 3 using
pywin32 build 216, and a couple of things are
not working quite the same way as they were with
Python 2 and build 213.

1) The default font used for control labels etc.
is slightly smaller.

2) When I calculate the width of a piece of text
using DC.GetTextExtent() I get a value that is
too small, and doesn't match the actual size of
the text as it is drawn.

Anyone have any idea what might have changed,
and what I can do about it?

--
Greg
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Fonts behaving differently with Py3/216

2011-03-03 Thread Mark Hammond

On 4/03/2011 1:31 PM, Greg Ewing wrote:

I recently tried running PyGUI on Python 3 using
pywin32 build 216, and a couple of things are
not working quite the same way as they were with
Python 2 and build 213.

1) The default font used for control labels etc.
is slightly smaller.

2) When I calculate the width of a piece of text
using DC.GetTextExtent() I get a value that is
too small, and doesn't match the actual size of
the text as it is drawn.

Anyone have any idea what might have changed,
and what I can do about it?


What version of python and how many bits?  I'm guessing you tried 3.2, 
which means you must have used the 64bit version (as the 32 bit version 
of pywin32 appears to have 2.x syntax .py files).  Assuming you've been 
using 32bit builds on 2.x, I guess that could point to a bug in the 
64bit port of pywin32?


The only other thing I can think if is the manifest changes - windows 
uses the manifest of the owning hmodule for some things (notably the 
version of the common controls used), which is why the winxpgui module 
exists.  It seems unlikely, but I wonder if those changes have told 
windows to put things in some kind of compatibility mode.


Cheers,

Mark
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Fonts behaving differently with Py3/216

2011-03-03 Thread Greg Ewing

Mark Hammond wrote:

What version of python and how many bits?  I'm guessing you tried 3.2, 
which means you must have used the 64bit version


No, it's 3.1, and 32 bit. It can't be 64, because the
machine I'm running it on can't handle that. (And it's
definitely not 23 bit either. :-)

The only other thing I can think if is the manifest changes - windows 
uses the manifest of the owning hmodule for some things


I don't really know anything about these manifest things.
Is there some tool I can use to examine them and see
whether anything is different?

--
Greg

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Fonts behaving differently with Py3/216

2011-03-03 Thread Mark Hammond

On 4/03/2011 3:26 PM, Greg Ewing wrote:

Mark Hammond wrote:


What version of python and how many bits? I'm guessing you tried 3.2,
which means you must have used the 64bit version


No, it's 3.1, and 32 bit. It can't be 64, because the
machine I'm running it on can't handle that. (And it's
definitely not 23 bit either. :-)


Interesting - I'm really confused how the 32 bit version for 3.2 failed 
to build correctly!



The only other thing I can think if is the manifest changes - windows
uses the manifest of the owning hmodule for some things


I don't really know anything about these manifest things.
Is there some tool I can use to examine them and see
whether anything is different?


The Windows SDK (and I assume VC - haven't checked) comes with a 
manifest tool - mt.exe.  The syntax is fairly obscure, but it allows 
you to extract, change and add manifests (but not remove them AFAIK). 
Note the manifest ID for DLLs is 2 - so the command to extract would be 
something like:


mt.exe -inputresource:path\to\whatever.pyd;#2 -out:out.txt

HTH,

Mark



___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32