[PD-dev] text placement

Hans-Christoph Steiner hans at eds.org
Wed Jan 17 05:45:26 CET 2007


It turns out that the fonts seem to vary quite a bit in their  
positioning... what a pain...  I still think the way to handle this  
is to just set the boxes to pixel sizes, then let the fonts fall  
where they may.  Too bad there isn't a free Lucida, or Inconsolata  
isn't done yet...  I can't seem to get Tcl to use Inconsolata, maybe  
because its a .otf not a .ttf.

One question I have is whether Pd really needs a monospaced font.  It  
looks quite good with Lucida Grande, which is proportional.

.hc

On Jan 8, 2007, at 2:49 PM, Miller Puckette wrote:

> In g_rtext.c:
>
>         sys_vgui("pdtk_text_new .x%lx.c %s %f %f {%.*s} %d %s\n",
>             canvas, x->x_tag,
>             dispx + LMARGIN, dispy + TMARGIN,
>             outchars, tempbuf, sys_hostfontsize(font),
>             (glist_isselected(x->x_glist,
>                 &x->x_glist->gl_gobj)? "blue" : "black"));
>
> places the text, and the border gets drawn in the text_drawborder()
> function.  I couldn't spot anything platform-dependent in the code,
> although I've noticed that drawing comes out differently on Mac  
> compared
> to other platforms - create a slider, for instance and look at the  
> bar.
> I believe Pd corrects for that when drawing inlets/outlet on objects,
> but I don't think there's anywhere else.
>
> cheers
> Miller
>
> On Mon, Jan 08, 2007 at 01:20:49PM -0500, Hans-Christoph Steiner  
> wrote:
>>
>> Can anyone point me to where the text is placed on the canvas in
>> relation to the object and message boxes?  It seems to vary depending
>> on platform and I'd like to troubleshoot it.
>>
>> .hc
>>
>> --------------------------------------------------------------------- 
>> ---
>>
>> As we enjoy great advantages from inventions of others, we should be
>> glad of an opportunity to serve others by any invention of ours; and
>> this we should do freely and generously.         - Benjamin Franklin
>>
>>
>>
>> _______________________________________________
>> PD-dev mailing list
>> PD-dev at iem.at
>> http://lists.puredata.info/listinfo/pd-dev


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

News is what people want to keep hidden and everything else is  
publicity.          - Bill Moyers






More information about the Pd-dev mailing list