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/11/13 15:25:33 UTC

DO NOT REPLY [Bug 4838] New: - Smaller text lost with strokeSVGText=false

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4838

Smaller text lost with strokeSVGText=false

           Summary: Smaller text lost with strokeSVGText=false
           Product: Fop
           Version: 0.15
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: pdf renderer
        AssignedTo: fop-dev@xml.apache.org
        ReportedBy: spam_from_apache_bugzilla@chezphil.org


The example below contains SVG text inside an FO document.  There are two
SVG diagrams which are almost identical - their contents should be shown
identically.  The only difference is that in the second case all the dimensions
have been reduced by a factor of ten, which is balanced by an increase by the
same factor in an enclosing scale transform.

With strokeSVGText=true (the default) it works fine.

With strokeSVGText=false, the first version is shown correctly.   In the second
version, only the second two text items are shown.  It seems that text items
with a font-size of less than 1 are not plotted.  That's a font-size of less
than 1 actually specified on the svg:text element, not after scaling has
been taken into account.

I have reported another issue where something similar happens to stroke-width
(bug 4766) - is this related?

This is with FOP 0.20.2-RC.

I would be very grateful for any feedback since without a fix I will have to
engineer a very messy workaround...

Here is the example:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master margin-right="25mm" margin-left="25mm"
                           margin-bottom="20mm" margin-top="15mm"
                           page-height="297mm" page-width="210mm"
                           master-name="a4">
      <fo:region-before extent="10mm"/>
      <fo:region-after extent="10mm"/>
      <fo:region-body margin-bottom="15mm" margin-top="15mm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-name="a4">
    <fo:flow flow-name="xsl-region-body">

      <fo:block>
        <fo:instream-foreign-object>
          <svg:svg xmlns:svg="http://www.w3.org/2000/svg"
                   width="15cm" height="11cm"
                   viewBox="0 0 4500 3300"
                   contentStyleType="text/css">
            <svg:g transform="scale(30)">
              <svg:text fill="#000000" text-anchor="middle" font-size="1"
                        x="80" y="10">ABC</svg:text>
              <svg:text fill="#000000" text-anchor="middle" font-size="3"
                        x="80" y="20">ABC</svg:text>
              <svg:text fill="#000000" text-anchor="middle" font-size="10"
                        x="80" y="40">ABC</svg:text>
              <svg:text fill="#000000" text-anchor="middle" font-size="30"
                        x="80" y="80">ABC</svg:text>
            </svg:g>
          </svg:svg>
        </fo:instream-foreign-object>
      </fo:block>

      <fo:block>
        <fo:instream-foreign-object>
          <svg:svg xmlns:svg="http://www.w3.org/2000/svg"
                   width="15cm" height="11cm"
                   viewBox="0 0 4500 3300"
                   contentStyleType="text/css">
            <svg:g transform="scale(300)">
              <svg:text fill="#000000" text-anchor="middle" font-size="0.1"
                        x="8" y="1">ABC</svg:text>
              <svg:text fill="#000000" text-anchor="middle" font-size="0.3"
                        x="8" y="2">ABC</svg:text>
              <svg:text fill="#000000" text-anchor="middle" font-size="1.0"
                        x="8" y="4">ABC</svg:text>
              <svg:text fill="#000000" text-anchor="middle" font-size="3.0"
                        x="8" y="8">ABC</svg:text>
            </svg:g>
          </svg:svg>
        </fo:instream-foreign-object>
      </fo:block>

    </fo:flow>
  </fo:page-sequence>
</fo:root>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org