You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2001/03/10 17:06:29 UTC
[Bug 928] New - Font metrics and setComponent
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=928
*** shadow/928 Sat Mar 10 08:06:29 2001
--- shadow/928.tmp.16396 Sat Mar 10 08:06:29 2001
***************
*** 0 ****
--- 1,27 ----
+ +============================================================================+
+ | Font metrics and setComponent |
+ +----------------------------------------------------------------------------+
+ | Bug #: 928 Product: Fop |
+ | Status: NEW Version: 0.17 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Linux |
+ | Priority: Component: awt renderer |
+ +----------------------------------------------------------------------------+
+ | Assigned To: Stanislav.Gorkhover@jcatalog.com,fop-dev@xml.apache.org |
+ | Reported By: gabor.melis@essnet.se |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ I created a component that uses AWTRenderer to display a document.
+ AWTRenderer needs a live swing component and I pass one to it every time I need
+ to render something (with setComponent()).
+
+ The first time it works fine, the second time it throws a NullPointerException
+ from AWTFontMetrics.java(line 262). It is because FontMetricsWrapper creates a
+ new AWTFontMetric only for the first time and subsequent calls do nothing.
+
+ It's very problematic because my component doesn't know long lived components
+ and at the second render attempt the original component used for font metric
+ calculation is long dead.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org