[PD] Font weirdness with 0.43test

Miller Puckette msp at ucsd.edu
Tue Aug 31 02:31:05 CEST 2010


On Mon, Aug 30, 2010 at 06:04:55PM -0400, Hans-Christoph Steiner wrote:
> 
> 
> On Sun, 2010-08-29 at 21:17 -0700, Miller Puckette wrote:
> > Or the Mathieu idea - let the text be small, the box be 'standard' size,
> > and let the text not fill the box -- but Pd could still know the true
> > size of the font so editing could work.  Clearly we'll never be able to
> > reliably set the font metrics and will have to play with what we're dealt,
> > one way or another.
> 
> IMHO, I think it would be a fair amount of work to implement Matju's
> idea, and that time would be better spent on other things. But I
> wouldn't object to someone doing that.
> 
Maybe I'm not seeing something but I think I can code it in 1/2 hour... just
not right now while I'm getting ready to travel.

> > I'm giving up on getting this out by Sept. 1 -- there's another show-stopper
> > bug that will take me more than 28 hrs. to fix (more confusion as to
> > who's 'visible' versus graph on parent)
> > 
> > d'oh...
> 
> Is this the bug I filed in the tracker?  I took a look, but I still
> haven't made sense of all the GOP code so I didn't get far.
> 
> donecanvasdialog stops arrays from redrawing until reload
> http://sourceforge.net/tracker/?func=detail&aid=3052388&group_id=55736&atid=478070

Not sure.  It's a whole complex of bugginess that has to do with the order in
which things are drawn and erased, that I had sort of swept under the rug
for 0.42 but which came bounding back when i 'fixed' SF patch 2913280 (at
least I think that's where it's coming from).  fun fun...

> .hc
> 
> > 
> > M
> > 
> > 
> > On Sun, Aug 29, 2010 at 01:45:13PM -0400, Hans-Christoph Steiner wrote:
> > > 
> > > The problem is that sending the measured font sizes via pd init puts us
> > > back at square one: the boxes will be different sizes depending on
> > > platform and now depending on font.  Then patch/GUI layout breaks across
> > > different platforms, and now when people use different fonts.
> > > 
> > > The least of all evils with the current implementation is having the box
> > > sizes fixed, and the fonts being a bit too small on the large box/font
> > > sizes.  That is achieved by undoing the part you just added where it
> > > sends the measured sizes rather than the fixed sizes via pd init.
> > > 
> > > The only way I can see properly doing this is having the pd <--> pd-gui
> > > communication be logical not pixel-based, and have pd-gui handle all of
> > > the editing operations.
> > > 
> > > .hc
> > > 
> > > On Fri, 2010-08-27 at 22:01 -0700, Miller Puckette wrote:
> > > > OK... applied that one, then went in and made the tcl script report the
> > > > "real" font metrics to Pd so it can draw the boxes correctly (they were still
> > > > off on 2 of the font sizes in Fedora 13 and anyway I despair of ever being
> > > > certain that the font sizes are exactly what Pd wished for) ... is the current
> > > > git upload working on others' machines?
> > > > 
> > > > thanks
> > > > Miller
> > > > 
> > > > On Thu, Aug 26, 2010 at 04:43:16PM -0400, Hans-Christoph Steiner wrote:
> > > > > 
> > > > > 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.
> > > > > 
> > > > 
> > > > 
> > > > >  (apply patch with "git am" to accept it as it).
> > > > > 
> > > > > .hc
> > > > > 
> > > > > 
> > > > > 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.
> > > > > 
> > > > > 
> > > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Pd-list at iem.at mailing list
> > > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> 
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



More information about the Pd-list mailing list