Bug 98762 - Zoomed labels are too short sometimes
Zoomed labels are too short sometimes
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Graph
5.x
All Windows XP
: P2 (vote)
: 6.x
Assigned To: issues@platform
issues@platform
: API_REVIEW_FAST
: 84012 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-23 08:54 UTC by bernd_selig
Modified: 2007-08-10 09:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Cut label (1.38 KB, image/png)
2007-03-23 08:55 UTC, bernd_selig
Details
Patch (13.66 KB, patch)
2007-08-01 15:29 UTC, David Kaspar
Details | Diff
Patch with update documentation (14.78 KB, patch)
2007-08-01 15:40 UTC, David Kaspar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bernd_selig 2007-03-23 08:54:41 UTC
Zoomed labels are too short in some zoom levels. Bug can be tested with the
test.tool.ToolTest example.
Comment 1 bernd_selig 2007-03-23 08:55:48 UTC
Created attachment 39855 [details]
Cut label
Comment 2 David Kaspar 2007-03-23 22:28:16 UTC
*** Issue 84012 has been marked as a duplicate of this issue. ***
Comment 3 David Kaspar 2007-03-23 22:43:22 UTC
This problem is caused by font hinting. The hinted font is a bitmap based and
has diferrent rendered-size than a size of a bigger font scaled-down to match
the small-font.

The solution is to add a new property to LabelWidget called "useVectorGlyphs".
If the property is set to true, then the font is converted to a set of glyphs
and used that way. This will disable the font hinting and force the correct
scaling. On the other hands, rendering non-hinted fonts may be not-easy-readable
text.
Comment 4 David Kaspar 2007-08-01 15:29:42 UTC
Created attachment 46011 [details]
Patch
Comment 5 David Kaspar 2007-08-01 15:39:50 UTC
A patch has been attached. A new LabelWidget.useGlyphVector property is added. If set to true, then the text of a
LabelWidget is converted to GlyphVector and it is rendered as a shape. Therefore it is rendered accurately no matter
what zoom-factor is set to a scene.
Asking for fast API review.
Comment 6 David Kaspar 2007-08-01 15:40:48 UTC
Created attachment 46013 [details]
Patch with update documentation
Comment 7 David Kaspar 2007-08-10 09:26:47 UTC
Fixed in main trunk. See test.label.LabelGlyphVectorTest example for usages.
Comment 8 David Kaspar 2007-08-10 09:27:46 UTC
forgotten to change "assignment".
Comment 9 David Kaspar 2007-08-10 09:28:40 UTC
Fixed


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo