[PD] Pd on high resolution displays

Jonathan Wilkes jancsika at yahoo.com
Tue Jan 14 18:53:23 CET 2014

On 01/14/2014 07:01 AM, Roman Haefeli wrote:
> 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?

No, it's supposed to come up with its own scaling factor when Pd is
started.  It would affect widgets like comboboxes and presumably
the menus, as well as the size of dialog boxes and everything else
that doesn't have its dimensions specified in fixed pixel sizes.

It should not affect anything within the canvas, as the boxes,
items, and text are specified with pixel sizes.

You should be able to type:
pdtk_post "[tk scaling]\n"

in the tcl prompt (toggle it from the "Help" menu) and see what value
tcl/tk is giving you.  Change your screen resolution and you will see it

Whether the number that's chosen is sane or actually works as advertised
is another matter.


>> 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:
>> http://www.youtube.com/watch?v=n3sz_KRdRmY
> 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
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

More information about the Pd-list mailing list