[PD] Font weirdness with 0.43test

Hans-Christoph Steiner hans at at.or.at
Thu Aug 26 22:43:16 CEST 2010

Looks like here are the options:

- have boxes fit around fixed font sizes and have different box sizes  
on each platform (vanilla up til 0.42)

- have font width fit into fixed box sizes and have long texts overrun  
the bottom of boxes (Pd-extended since 0.40)

- hopefully the best for now, have the width, then height fit into the  
fixed box sizes, and use fonts that are known to work the best.  I  
attached a patch which implements this and it seems to work pretty  
well.  I discovered that the fixed box sizes were different than Pd- 
extended so I synced them up so layout should be the same everywhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-make-boxsizes-same-as-Pd-extended-and-check-fonts-fo.patch
Type: application/octet-stream
Size: 2020 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100826/7f0dd36e/attachment-0001.obj>
-------------- next part --------------
  (apply patch with "git am" to accept it as it).


On Aug 26, 2010, at 2:43 PM, Miller Puckette wrote:

> OK.. but for 0.43... is there a stopgap?  I can't think of any way to
> get text editing working (i.e., getting the character you click on to
> be the one Pd sees you click on) except by going back to status quo.
> cheers
> MIller
> On Thu, Aug 26, 2010 at 01:54:15PM -0400, Hans-Christoph Steiner  
> wrote:
>> On Aug 26, 2010, at 12:52 AM, Miller Puckette wrote:
>>> My machine is running 8.5... but I don't think it's good to have
>>> Pd's default font choice come out all wrong... ideally, it should do
>>> something reasonable no matter what the font (well, at least if it's
>>> fixed-pitch).  At the very least, Pd has to know the correct font
>>> metrics... and it seems now not to.
>> I should add, given my experience, I don't think this is a realistic
>> goal without major surgery.  Its something I've put a lot of work
>> into trying to get working.  My experience tells me that the best
>> bet is using a default font.
>> Even better would be making the pd <--> pd-gui communication not
>> deal with pixel values and mouse motion, but instead logical
>> operations. For example, instead of pd knowing anything about the
>> text editing operation, that should happen entirely in the gui.
>> Then once the editing operation is complete, the GUI would send the
>> result to pd.
>> .hc
>>> Perhaps a solution for cross-platform patching (such as for making
>>> help
>>> files) could be to say "this will look woerd on other machines  
>>> unless
>>> you use font <blaz> to develope the patch so that you see the
>>> canonical
>>> sizes.
>>> cheers
>>> M
>>> On Wed, Aug 25, 2010 at 04:18:49PM -0400, Hans-Christoph Steiner
>>> wrote:
>>>> Here is the answer to this font problem:
>>>> - use Tcl/Tk 8.5 or newer, Tcl 8.4 is very flawed (see archives for
>>>> discussion, basically it makes bad guesses and assigns them to the
>>>> fontname "courier")
>>>> - use one of these fonts: {"Courier 10 Pitch" "DejaVu Sans Mono" \
>>>>      "Bitstream Vera Sans Mono" "Droid Sans Mono" "Andale Mono"
>>>> Anything else and you'll have strange results.  In order to have
>>>> better
>>>> font support, we need to do some major surgery.
>>>> .hc
>>>> On Tue, 2010-08-24 at 13:38 -0700, Miller Puckette wrote:
>>>>> Long as there's a way to fix a problem I'm having:  in message
>>>>> boxes with
>>>>> many lines of text, you can easily click on one character and
>>>>> select one above
>>>>> it... it gets very confusing.  (Fedora 13 out-of-box).
>>>>> I'm guessing that in the current version the GUI simply tells
>>>>> Pd what size
>>>>> the font ought to have had instead of the genuine one.  Pd
>>>>> could easily
>>>>> expand the box to the ought-to size (at least optionally for
>>>>> those wishing
>>>>> to make cross-platform patches) but should know about the
>>>>> text's actual size
>>>>> anyway.  To be continued...
>>>>> cheers
>>>>> Miller
>>>>> On Tue, Aug 24, 2010 at 01:21:08AM -0400, Hans-Christoph
>>>>> Steiner wrote:
>>>>>> On Aug 23, 2010, at 7:01 AM, Frank Barknecht wrote:
>>>>>>> Hi,
>>>>>>> On Sat, Aug 21, 2010 at 01:39:08PM -0400, Mathieu Bouchard  
>>>>>>> wrote:
>>>>>>>> BTW I've been using Pd-Extended's Linux/OSX default font
>>>>>>>> size as the
>>>>>>>> basis for all my patches for making my last 400 patches or so.
>>>>>>> I've used Pd vanilla for all my patches so far, with a
>>>>>>> "10" font-size,
>>>>>>> whatever that is in pixels. I know, that Pd-extended uses some
>>>>>>> different
>>>>>>> layout for several years now, which makes patches look
>>>>>>> wrong when you
>>>>>>> load them in Pd vanilla and the other way around. I have not  
>>>>>>> much
>>>>>>> interest to discuss the differences between vanilla and
>>>>>>> Pd-x, as I am
>>>>>>> hoping the two to unify again with the gui-rewrite. So I'm
>>>>>>> willing to
>>>>>>> change my preferences to whatever will be the new vanilla, but  
>>>>>>> I'd
>>>>>>> prefer to not do again that with every release or with every new
>>>>>>> Courier-like font that pops up on the Internets' Top 10
>>>>>>> console font
>>>>>>> lists and is so much better than the previous ones.
>>>>>> Unless Miller changes it in the future, Pd 0.43 should have
>>>>>> the same
>>>>>> boxes sizes that Pd-extended has had for a couple versions.  That
>>>>>> was one of my goals with the GUI rewrite.  Its a bug if that's  
>>>>>> not
>>>>>> the case.
>>>>>> .hc
>>>>>> ----------------------------------------------------------------------------
>>>>>> The arc of history bends towards justice.     - Dr. Martin Luther
>>>>>> King, Jr.
>>>>>> _______________________________________________
>>>>>> Pd-list at iem.at mailing list
>>>>>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>> ----------------------------------------------------------------------------
>> Programs should be written for people to read, and only incidentally
>> for machines to execute.
>> - from Structure and Interpretation of Computer Programs


I have the audacity to believe that peoples everywhere can have three  
meals a day for their bodies, education and culture for their minds,  
and dignity, equality and freedom for their spirits.      - Martin  
Luther King, Jr.

More information about the Pd-list mailing list