On Don, 2014-01-09 at 15:46 -0800, Jonathan Wilkes wrote:
In Pd Vanilla and possibly Pd-l2ork, tk menus and widgets should "do the right thing" because of something called tk scaling: http://wiki.tcl.tk/8484 In Pd-extended, "tk scaling" is hard-coded to "1" in pd-gui.tcl, but if you remove that line things should scale up accordingly. (Or reveal bugs in tk if things look wacky as a result.)
Actually, in my version of Pd (0.45-4 from git tag, 0.45.0 in Pd's help), 'tk scaling 1' is commented out. Uncommenting it doesn't change anything in Pd. Also changing it to whatever value doesn't show any effect.
If I understand the documentation correctly, a tcl/tk pogrammer should retrieve the display width+height and pixel resolution and calculate the proper tk scaling, right?
You won't be able to scale iemgui sizes in any flavor of Pd. They are specified in pixel units. There is a canvas "scale" subcommand but the catch is that text items (i.e., most of the content of a patch) doesn't actually get scaled. Worse, tk canvas seems only to support integer font sizes, making it burdensome to try to use canvas scaling and manually tweak the font sizes to match. (I think Pd-l2ork currently does the reverse-- you choose a different font size and it picks a corresponding scaling factor, though I don't know if it actually uses the "scale" subcommand or not.)
So burdensome is scaling text on a tk canvas that someone just decided to make their own mono-spaced vector font in tcl/tk using canvas curves, demo'd here:
Why not use that font in Pd? It would make Pd look the same on every platform, wouldn't it? Or does that have other drawbacks?
I like the video. Had to watch it to the end. It amazes me how the poster obviously finds never-ending pleasure in playing with that feature while listening to good music and humming along happily. It seems like a zen kind of thing ;-)
Roman