at the moment in wxWidgets at least, the string gets broken into chunks and 
parsed to deal with superscript and newlines etc then the chunks get passed for 
drawing. this is wy wxWidgets built in underline doesn't work as we want, 
because it draws the sb/superscript chunks separately. We'll need to draw our 
own underlined to avoid this. If more than one driver needs this support, which 
it sounds like it does, then i think we'd be best doing string parsing and 
under/overline drawing from the plplot core. This means we only need to write 
one set of code and it ensures consistency between drivers. It would mean the 
drivers need to report section length and height. I can't remember if they do 
this already, I've a feeling they report height but not length.

Even for drivers which can deal with newlines an lines properly it might be 
best to do this for consistency 

Phil


>Message: 5
>Date: Fri, 04 Oct 2013 22:56:12 +0100
>From: Andrew Ross <[email protected]>
>Subject: Re: [Plplot-devel] [Plplot-general] overline underline not
>       working
>To: [email protected]
>Cc: [email protected]
>Message-ID: <6819617.KaAtuKdlEI@andrew-laptop>
>Content-Type: text/plain; charset="us-ascii"
>
>
>(Moved to plplot-devel since it is more appropriate).
>
>Post release I've finally got back to looking at this. Closer examination of 
>the code shows that handling over the overline / underline (and also backchar) 
>escape sequences is a bit of a mess. 
>
>Drivers such as xwin which let plplot deal with text plotting work fine, but 
>all others which have their own text handling routines seem to have problems. 
>Superscript / subscipt has been handled correctly in each case, since the 
>examples use these so failings are immediately obvious. The other escape codes 
>are not tested. 
>
>I've made some alterations to the cairo driver to handle underline. Since 
>pango deals with this anyway it is relatively trivial. Overlining will need 
>drawing which is likely to be more work. Backchar will also require manual 
>implementation. At least cairo now warns about the non-implementation of these 
>escape codes.
>
>The other drivers (qt, wxwidgets etc) will also require similar work. Qt at 
>least seems to have both overline and underline properties which can be 
>applied to the QFont class. Similarly the wxwidget  wxFont has an underline 
>property. 
>
>At the least we should try to ensure the drivers behave correctly where 
>possible, and fail gracefully where not. 
>
>It would also be useful to demonstrate these capabilities in one of the 
>examples (perhaps example 23?)
>
>Andrew
>
>On Tuesday 02 Jul 2013 20:22:32 [email protected] wrote:
>> Hi plplot-developers,
>> 
>> I already made a bug-report, but remembered Werner saying this isn't
>> followed much...
>> 
>> 
>>  From the Bug--Report:
>> 
>> 
>> Hi,
>> I use Plplot v5.9.9
>> and
>> 
>> plmtex("b", 0, 1, 1, "#+S#+(#-freq#-)");
>> 
>> does not give overlines, underlines only all the Symbols are shown
>> including #.
>> 
>> Other Sequences like unicode or subscript are working fine.
>> 
>> Output-device: png-cairo
>> 
>> If svg (not cairo) than the Escape-sequence is missing, but no lines shown.
>> 
>> Thanks
>> Stefan
>> 
>> 
>> ----------------------------------------------------------------------------
>> -- This SF.net email is sponsored by Windows:
>> 
>> Build for Windows Store.
>> 
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Plplot-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/plplot-general
>
>
>
>------------------------------
>
>Message: 6
>Date: Fri, 04 Oct 2013 23:30:40 +0100
>From: Andrew Ross <[email protected]>
>Subject: Re: [Plplot-devel] [Plplot-general] overline underline not
>       working
>To: [email protected]
>Cc: [email protected]
>Message-ID: <2151389.26WYl2nDyU@andrew-laptop>
>Content-Type: text/plain; charset="us-ascii"
>
>
>Further testing shows that the qt driver does support underline and overline 
>already, but this only seems to work when -drvopt text_vectorize=1 is 
>specified. Looking at the code it is not immediately obvious to me why it 
>doesn't work in other cases. Perhaps someone with more qt experience than me 
>can look at this.
>
>Andrew
>
>On Friday 04 Oct 2013 22:56:12 Andrew Ross wrote:
>> (Moved to plplot-devel since it is more appropriate).
>> 
>> Post release I've finally got back to looking at this. Closer examination of
>> the code shows that handling over the overline / underline (and also
>> backchar) escape sequences is a bit of a mess.
>> 
>> Drivers such as xwin which let plplot deal with text plotting work fine, but
>> all others which have their own text handling routines seem to have
>> problems. Superscript / subscipt has been handled correctly in each case,
>> since the examples use these so failings are immediately obvious. The other
>> escape codes are not tested.
>> 
>> I've made some alterations to the cairo driver to handle underline. Since
>> pango deals with this anyway it is relatively trivial. Overlining will need
>> drawing which is likely to be more work. Backchar will also require manual
>> implementation. At least cairo now warns about the non-implementation of
>> these escape codes.
>> 
>> The other drivers (qt, wxwidgets etc) will also require similar work. Qt at
>> least seems to have both overline and underline properties which can be
>> applied to the QFont class. Similarly the wxwidget  wxFont has an underline
>> property.
>> 
>> At the least we should try to ensure the drivers behave correctly where
>> possible, and fail gracefully where not.
>> 
>> It would also be useful to demonstrate these capabilities in one of the
>> examples (perhaps example 23?)
>> 
>> Andrew
>> 
>> On Tuesday 02 Jul 2013 20:22:32 [email protected] wrote:
>> > Hi plplot-developers,
>> > 
>> > I already made a bug-report, but remembered Werner saying this isn't
>> > followed much...
>> > 
>> >  From the Bug--Report:
>> > Hi,
>> > I use Plplot v5.9.9
>> > and
>> > 
>> > plmtex("b", 0, 1, 1, "#+S#+(#-freq#-)");
>> > 
>> > does not give overlines, underlines only all the Symbols are shown
>> > including #.
>> > 
>> > Other Sequences like unicode or subscript are working fine.
>> > 
>> > Output-device: png-cairo
>> > 
>> > If svg (not cairo) than the Escape-sequence is missing, but no lines
>> > shown.
>> > 
>> > Thanks
>> > Stefan
>> > 
>> > 
>> > --------------------------------------------------------------------------
>> > -- -- This SF.net email is sponsored by Windows:
>> > 
>> > Build for Windows Store.
>> > 
>> > http://p.sf.net/sfu/windows-dev2dev
>> > _______________________________________________
>> > Plplot-general mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/plplot-general
>> 
>> ----------------------------------------------------------------------------
>> -- October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
>> from the latest Intel processors and coprocessors. See abstracts and
>> register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Plplot-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>
>
>
>------------------------------
>
>------------------------------------------------------------------------------
>October Webinars: Code for Performance
>Free Intel webinars can help you accelerate application performance.
>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
>the latest Intel processors and coprocessors. See abstracts and register >
>http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
>
>------------------------------
>
>_______________________________________________
>Plplot-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/plplot-devel
>
>
>End of Plplot-devel Digest, Vol 89, Issue 6
>*******************************************


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to