[PD-dev] remove tk scaling
Miller Puckette
msp at ucsd.edu
Thu Jun 13 01:54:12 CEST 2013
Hi Jonathan et a -
I've never understood the reason tk_scaling is touched in the TK code and
unless someone else objects I'll try taking it out of the vanilla source.
thanks
Miller
On Tue, Jun 11, 2013 at 06:11:57PM -0700, Jonathan Wilkes wrote:
> Hi list,
>
> From tcl/pd-gui:
> # we are not using Tk scaling, so fix it to 1 on all platforms. This
> # guarantees that patches will be pixel-exact on every platform
> tk scaling 1
>
> From #tcl on freenode:
> <jancsika> hello. does tk scaling affect canvas items?
> <ijchain> <emiliano> jancsika: no
>
> From my own experiments on Debian:
> * setting the tk scaling to 1, 0.2, 3, or 200 does not alter
> a canvas text item, either for positive (pointsize) font sizes
> or negative (pixelsize) font sizes
> * with version 8.5.11, setting tk scaling to 1, 0.2, 3, or 200
> _will_ change the actual number of pixels a canvas requests
> from its parent _if_ you pack it without any option flags.
> (e.g., scaling at 0.2 will request a tiny rectangle and scaling
> at 200 will be bigger than the visible screen area, at least on
> my laptop). However, Pd packs its canvas items to fill the
> cavity provided by the toplevel parent (which always has
> its geometry set explicitly), so no matter what tk scaling value
> you set the canvas will be exactly the right size.
>
> You can check this by setting tk scaling to any value at all.
> The tk widgets will of course look different (that's what tk
> scaling affects, after all), but just click <ctrl-n> for a new
> patch and it will look exactly right. Also try:
>
> [label foo(
> |
> [vsl]
>
> ... and you will find that even iemguis have _exactly_ the
> same font size no matter what you provided for tk scaling.
>
> Effect of [tk scaling 1] command:
> causes tiny fonts in various widgets on Windows, which then
> requires a dev to fire up Pd on a Windows machine and
> screw around with the options database until they find the
> correct string to set the menufont
>
> Side effect: if you want to embed tk widgets in a patch, not
> having tk scaling frozen at "1" may end up making those widgets
> have different sizes on different platforms. But even with
> [tk scaling 1] you cannot guarantee pixel-exactness in this case,
> because tk uses native widgets from the OS, and different OSes
> will request different padding, font-sizes, images, etc. for those
> widgets.
>
> So-- is there any reason not to remove "tk scaling 1"?
>
> Thanks,
> Jonathan
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
More information about the Pd-dev
mailing list