This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 98762

Summary: Zoomed labels are too short sometimes
Product: platform Reporter: bernd_selig <bernd_selig>
Component: GraphAssignee: issues@platform <issues>
Status: RESOLVED FIXED    
Severity: blocker Keywords: API_REVIEW_FAST
Priority: P2    
Version: 5.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: Cut label
Patch
Patch with update documentation

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