Bug 181540 - Super- and subscripts not rendered in legend text
Summary: Super- and subscripts not rendered in legend text
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-21 23:33 UTC by D. V. Wiebe
Modified: 2009-01-22 01:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (5.54 KB, application/octet-stream)
2009-01-22 00:06 UTC, D. V. Wiebe
Details
Exported PNG showing missing legend text (9.40 KB, image/png)
2009-01-22 00:07 UTC, D. V. Wiebe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2009-01-21 23:33:20 UTC
Version:           1.8.0_svn_914813 (using KDE 3.5.10)
Compiler:          gcc (GCC) 4.2.4 
OS:                Linux
Installed from:    Compiled From Sources

Text following a superscript or subscript control character (^ or _) in a legend text is not rendered in the legend.  This worked in 1.7.0.

Steps to reproduce:

1. create a plot with a curve
2. Enable the legend in the plot by selecting "Show" check box under "Legend" in the "Appearance" tab of the Edit Plot dialogue.
3. change the curve's legend text in the Edit Curve dialogue.  Set the legend to, say, "a b^c d"

Result:

The legend text shows up as "a b".  ie.  all text after the ^ is ignored.

Expected Result:

The legend text should read "a bc d" with the "c" in superscript.
Comment 1 Andrew Walker 2009-01-22 00:00:30 UTC
I'm unable to reproduce this with the latest code.

Could you attach a kst file (as simple as possible) that shows the problem.

Thanks
Comment 2 D. V. Wiebe 2009-01-22 00:06:47 UTC
Created attachment 30500 [details]
Testcase

A test .kst file exhibiting the bug
Comment 3 D. V. Wiebe 2009-01-22 00:07:35 UTC
Created attachment 30501 [details]
Exported PNG showing missing legend text

And here's the screenshot
Comment 4 Andrew Walker 2009-01-22 00:21:47 UTC
The problem is not with the text per se, but with the colours used to display the text. Following the ^ or _ the font colour reverts to the default rather than that specified by the user. This can cause the rest of the text to become invisible if the legend colour is the same as the font default colour.
Comment 5 Andrew Walker 2009-01-22 01:34:23 UTC
SVN commit 914906 by arwalker:

BUG:181540 correctly set default font color for legend text

 M  +1 -0      kstviewlegend.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=914906