[wxPython] Font size and print preview

Hi Tim,

win98se, py2.2.1, wxpy 2.3.3.pre6

You wrote:
Microsoft Word is different: it places each character individually,
instead of relying on TextOut to draw the whole string with its
normal spacing. Word reads the TrueType outlines directly
from the font files, does its own scaling...

Thanks for the information, I did not know that. It is more or less
like the boxes juxtaposition in (La)TeX.

You wrote:
The 100% scaling means the PHYSICAL size is the same....

Yes and no. This is the physical size of the printable area, and
not the physical size of the page (or the paper sheet). I am surprised
there is no way in wxPython to get the physical paper size. The question
is coming from time to time in this mail list.
printout.printout.GetPageSizePixels()
and printout.GetPageSizeMM() return the physical printable size.
One another point I have to mention, it is impossible too, to get
the position of the printable area in the page. This can be very
usuful for people, who want to print on pre-printed forms.

About the dc size numbers and the different sizes in 2.3.2.1 and 2.3.3,
you wrote:
Is this on the exact same system? Did you change the system's default font?
Here Python thinks your screen is 120 dpi. That is correct if you select
"large fonts" in Windows.

Yes it is the same system and I did not change the system font.
How did I make the test? I have two directories, one for
wxPython 2.3.2.1 and one for wxPython 2.3.3pre6.
I use the same python script with the corresponding wxPython dir.
I am not surprised that there is a difference in the versions.
Using 2.3.2.1, I had memory error for large zoom, this is
no more appearing in 2.3.3. I think, the reduced canvas size in 2.3.3
implies a ligther memory bitmap.

About my preview in vb, you wrote:
Do you mean "size" in pixels, or "size" in inches/twips? ...

I took care the size in pixels of my PictureBox was the same as the
printer size in pixels. You may argue, it covers the screen area,
but I constructed a 'scrolled window'.

Since you are an expert, I have the following questions:
1) In my PrintOut, I have somthing like this.
    ...
    wi, he = dc.GetSizeTuple()
    dc.DrawRectangle(0, 0, wi, he)
   ....
If I look at this rectangle in the PrintPreview, the left border
of the rectangle is not at the left border of the preview
canvas. There is a gap of one pixel.
Does this happen on my system only?
2) At a zoom factor of 200%, I do not see, or better said,
I can not navigate through the full page!
3) I am sure, you have notice, that at the bottom-left
shadow of the canvas, a black pixel is missing!

I create different previews in vb, now I am doing
the same work using wxPython. I discover
strange differences... If I refer to vb, it is just
because I was using this tool, before I discover the
wonderful python world.

Regards
Jean-Michel Fauth, Switzerland