[PD] pd font finetuning with tk scaling ?

Andre Schmidt huolong at arcor.de
Wed Nov 23 02:26:34 CET 2005


hi,

started to experiment with fonts under tk, and while reading the tk
manual, i found this:

http://www.tcl.tk/man/tcl8.5/TkCmd/tk.htm#M7
"tk scaling ?-displayof window? ?number?
        Sets and queries the current scaling factor used by Tk to
        convert between physical units (for example, points, inches, or
        millimeters) and pixels. The number argument is a floating point
        number that specifies the number of pixels per point on window's
        display. If the window argument is omitted, it defaults to the
        main window. If the number argument is omitted, the current
        value of the scaling factor is returned. 
        A ``point'' is a unit of measurement equal to 1/72 inch. A
        scaling factor of 1.0 corresponds to 1 pixel per point, which is
        equivalent to a standard 72 dpi monitor. A scaling factor of
        1.25 would mean 1.25 pixels per point, which is the setting for
        a 90 dpi monitor; setting the scaling factor to 1.25 on a 72 dpi
        monitor would cause everything in the application to be
        displayed 1.25 times as large as normal. The initial value for
        the scaling factor is set when the application starts, based on
        properties of the installed monitor, but it can be changed at
        any time. Measurements made after the scaling factor is changed
        will use the new scaling factor, but it is undefined whether
        existing widgets will resize themselves dynamically to
        accomodate the new scaling factor."

wouldnt this mean that we could do pixel accurate, measurements and
finetuning (calibration) on the client to get the desired font size ?

i made a test and added "tk scaling 1.5" in the beginning of "pd.tk"
made a test pacth with all gui objects having font size 10...
but it seems to affect only labels, and nmb2 : http://osku.de/allgui.png

well, didnt find out how to get it work with the other gui stuff (and im
tired), so i desided to ask before i continue my... quest :)

font agent ;)
andre "oskude" schmidt

ps. attached is that allgui.pd
pss. pd is devel 0.39-1test1





More information about the Pd-list mailing list