[PD] Font weirdness with 0.43test

Hans-Christoph Steiner hans at at.or.at
Fri Aug 20 20:21:29 CEST 2010


The font point sizes do not match up to other apps, so a 12pt font in  
Pd is not the same size as a 12pt font in a GNOME app.  That is  
because the Pd box sizes are hard coded in pixel sizes.  That means  
that you always get the same size box no matter what platform, or no  
matter what font you have installed.  In order to make this work, the  
font for a given point size is the largest font that will fit into the  
fixed box size.

In order for there to be proper font sizing and cross-platform layout,  
things need to be architected quite a bit differently.  I think the  
best way would be to implement using Tk scaling, then allow the GUI to  
handle mouse motion, clicks, etc.  There are issues there too, its  
unfortunately not simple.  But basically, the communcation between pd  
and pd-gui should be more about logical actions than positions.

Inconsolata is an awesome font, by far the best fixed-font I've seen  
anywhere.  That's why made Pd use it if it can find it.  Otherwise it  
settles on what Tcl/Tk decides to call "courier" (see Tk font docs).

     set testfonts {"Inconsolata" "Courier New" "Liberation Mono"  
"FreeMono" \
                        "DejaVu Sans Mono" "Bitstream Vera Sans Mono"}


.hc

On Aug 20, 2010, at 1:30 PM, Bernardo Barros wrote:

> I would vote for this fixed-spaced (but not ugly) font:
> http://www.levien.com/type/myfonts/inconsolata.html
>
>
> 2010/8/20 Frank Barknecht <fbar at footils.org>:
>> On Fri, Aug 20, 2010 at 10:17:27AM -0700, Miller Puckette wrote:
>>> I don't know how to do this in a way that's portable across  
>>> platforms...
>>> this has been a huge unsolved problem for years :)
>>
>> Hehe, yeah, I'm used to tears. :)
>>
>> Anyway in my quick test the GUI rewrite seems to have degraded a  
>> bit in
>> this regard, as 0.42 showed the same font size that standard Gtk apps
>> like Vim use.
>>
>> But maybe some Gnome users can compare font sizes between Pd and Gtk-
>> (or Qt) apps and some defaults for Linux can just be adapted?
>>
>> Ciao
>> --
>> Frank
>>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



----------------------------------------------------------------------------

"[W]e have invented the technology to eliminate scarcity, but we are  
deliberately throwing it away to benefit those who profit from  
scarcity."        -John Gilmore





More information about the Pd-list mailing list