You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/04/14 07:10:59 UTC

DO NOT REPLY [Bug 42123] New: - Regression: Batik 1.7 -> FOP converts 'sans-serif' to 'SansSerif'

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42123>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42123

           Summary: Regression: Batik 1.7 -> FOP converts 'sans-serif' to
                    'SansSerif'
           Product: Batik
           Version: 1.7
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: regression
          Priority: P2
         Component: SVG Rasterizer
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: richard@kennardconsulting.com


There appears to be a regression between Batik 1.6 and 1.7 Beta 1 with regard to
Apache FOP 0.93. As I am neither an expert at Batik nor FOP, I will struggle to
define the issue, but here goes:

Apache FOP delegates to Batik whenever it encounters some embedded SVG. If the
embedded SVG contains 'font-family='sans-serif', FOP will pass that to Batik,
and Batik will (for good reasons I'm sure) convert that to 'SansSerif'.

It then seems (I could be wrong) that if the SVG contains embedded text, Batik
will pass that BACK to FOP to render. When it does this, however, it passes back
'SansSerif' instead of 'sans-serif', which FOP cannot resolve and substitutes
'any,normal,400' instead. Generally, 'any' does not equal 'sans-serif'.

You can work around this behaviour by doing...

Fop fop = FOP_FACTORY.newFop( getMimeType(), p_out );
FOTreeBuilder contentHandler = (FOTreeBuilder) fop.getDefaultHandler();
FontInfo info = contentHandler.getEventHandler().getFontInfo();
info.addFontProperties( "F1", FontInfo.createFontKey( "SansSerif", "normal", 400
) );

...(eg. tell FOP what 'SansSerif' means) - but that doesn't seem ideal.

Batik 1.6 didn't seem to have this problem?

I am using JFreeChart 1.0.5 to generate the SVG (via Batik 1.7), and FOP 0.93 to
render the PDF (also via Batik 1.7)

Regards,

Richard.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 42123] - Regression: Batik 1.7 -> FOP converts 'sans-serif' to 'SansSerif'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42123>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42123





------- Additional Comments From cam@apache.org  2007-11-06 17:12 -------
A recent change in FOP (SVN) may have fixed this:

  http://svn.apache.org/viewvc?rev=591579&view=rev

Could you test again with an SVN version of FOP and Batik?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 42123] - Regression: Batik 1.7 -> FOP converts 'sans-serif' to 'SansSerif'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42123>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42123





------- Additional Comments From richard@kennardconsulting.com  2007-04-13 22:20 -------
Sorry - I forgot to say thanks for all your hard work on Batik! It really is an 
awesome product, and I have found it extremely useful for many years.

I am particularly excited about a 1.7 release, because then I can stop using a 
trunk-version of 1.6.

Richard.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 42123] - Regression: Batik 1.7 -> FOP converts 'sans-serif' to 'SansSerif'

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42123>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42123


cam@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fop-
                   |                            |dev@xmlgraphics.apache.org
             Status|NEW                         |ASSIGNED




------- Additional Comments From cam@apache.org  2007-09-25 21:20 -------
Batik probably needs to have its font mappings configurable.  Currently it's
done statically in org.apache.batik.gvt.font.FontFamilyResolver.  FOP guys, is
that what you would need to ensure that generic font names like sans-serif get
rendered in the font of FOP's choice on the PDFGraphics2D?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org