Hi!
Appears that if Xft-enabled fonts are used and font size is negative (gives size in pixels, not in points) then canvas postscript prints text inverted (rotated at 180 degrees).
The problem is that Tk_PostscriptFontName() is expected to return font size in points, but it returns just TkFont size attribute which may be negative.
The attached patch converts negative size attribute to positive, so canvas postscript becomes working again.
Makes font size always positive (in points, not in pixels)
Fixed now.
Also got rid of the stupidity which had us distributing a PS prolog which wasn't used, and made rotated text print properly (well, assuming it gets mapped to a font that the printer understands correctly, which is a whole separate issue.)
backport for 8.5.6 ?
Done (well, the part that was the fix of this bug...)
thanks for the effort, but
the build is now broken:
/local/home/dgp/cvs/tk8.5/unix/../generic/tkCanvPs.c: In function ‘Tk_PostscriptFont’:
/local/home/dgp/cvs/tk8.5/unix/../generic/tkCanvPs.c:758: warning: implicit declaration of function ‘TkFontGetPoints’
/local/home/dgp/cvs/tk8.5/unix/../generic/tkCanvPs.c:758: error: ‘TkPostscriptInfo’ has no member named ‘tkwin’
Please fix or revert.
Bother, I'd forgotten that I'd added the 'tkwin' field.
Now builds right.