[PD-dev] remove tk scaling

Jonathan Wilkes jancsika at yahoo.com
Wed Jun 19 00:14:55 CEST 2013





________________________________
 >From: Hans-Christoph Steiner <hans at at.or.at>
>To: pd-dev at iem.at 
>Sent: Tuesday, June 18, 2013 1:39 PM
>Subject: Re: [PD-dev] remove tk scaling
 


>In general, removing bits of code willy-nilly is a bad idea.

Agreed.  Now let's talk about this specific case.

> In this case, it
>took a ton of testing to get the right set of tweaks working across all
>platforms smoothly with the same pixel sizes on all platforms.

And those tweaks (read: using pixel font sizes) give pixel exact results across
OSX, Windows, and Debian, _regardless_ of what value is set for tk scaling.

[tk scaling 1] is what leads to the tiny font problem on Windows.

> Given that you
>only tested on GNU/Linux, its a really bad idea to propose changes based only
>on one platform unless you are planning to drop support for all other platforms.

Sorry: I tested patch pixel-exactness on all platforms and only the canvas demo
below in Debian.  [tk scaling] for "point-sized" fonts (i.e., non-negative values)
in Windows will affect canvas text items, but not "pixel-sized" text items, which
AFAICT is everything in Pd.

I've tested with a) long comments, b) iemguis and their labels, and c) normal
object and message boxes.  All the above are pixel-exact across OSX, Windows,
GNU/Linux regardless of tk scaling value.

>So follow what the comment there says: "This guarantees that patches will be
>pixel-exact on every platform".  If we had a pure Tcl/Tk GUI, then we could
>actually use tk scaling, and allow the user to adjust the tk scaling number,
>thereby having a zoomable interface.  That will require removing all GUI logic
>from the pd core and putting it only in the GUI.

As I pointed out below, "point-sized" fonts (i.e., non-negative) aren't affected
by [tk scaling n] on Debian (X11), so using [tk scaling n] to get a zoomable interface
is not cross-platform and therefore isn't a possibility.

Also, note that the starting point for this was the tiny font bug that reappears every
time someone makes a gui-plugin or new dialog with a widget that didn't get caught
by one of the many [option add etc.] statements that are there to correct the bug
caused by [tk scaling 1].

-Jonathan

.hc

On 06/12/2013 07:54 PM, Miller Puckette wrote:
> 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,
>>
>> 


More information about the Pd-dev mailing list