This example shows strangely distored text in the PDF output, but works correctly for -awt. Works when scaled, suggesting weird rounding-to-integer problem? FOP 0.20.2-RC. <?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" fill="none" width="5cm" height="1cm" viewBox="0 0 5.0 1.0" preserveAspectRatio="xMidYMid meet" contentScriptType="text/ecmascript" contentStyleType="text/css"> <svg:text fill="#000000" text-anchor="start" font-size="0.3" x="0.1" y="0.2">x1: Hello World</svg:text> </svg:svg> </fo:instream-foreign-object> </fo:block> <fo:block> <fo:instream-foreign-object> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" fill="none" width="5cm" height="1cm" viewBox="0 0 50.0 10.0" preserveAspectRatio="xMidYMid meet" contentScriptType="text/ecmascript" contentStyleType="text/css"> <svg:g transform="scale(10.0)"> <svg:text fill="#000000" text-anchor="start" font-size="0.3" x="0.1" y="0.2">x10: Hello World</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" fill="none" width="5cm" height="1cm" viewBox="0 0 500 100" preserveAspectRatio="xMidYMid meet" contentScriptType="text/ecmascript" contentStyleType="text/css"> <svg:g transform="scale(100)"> <svg:text fill="#000000" text-anchor="start" font-size="0.3" x="0.1" y="0.2">x100: Hello World</svg:text> </svg:g> </svg:svg> </fo:instream-foreign-object> </fo:block> <fo:instream-foreign-object> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" fill="none" width="5cm" height="1cm" viewBox="0 0 5000 1000" preserveAspectRatio="xMidYMid meet" contentScriptType="text/ecmascript" contentStyleType="text/css"> <svg:g transform="scale(1000)"> <svg:text fill="#000000" text-anchor="start" font-size="0.3" x="0.1" y="0.2">x1000: Hello World</svg:text> </svg:g> </svg:svg> </fo:instream-foreign-object> </fo:flow> </fo:page-sequence> </fo:root>
The numbers being output are rounded to 5 decimal places. This will mean that the curves are distorted if the numbers are very close together. This should be handled better in the future. For now you can scale the text of draw as normal text without curves.
This works for me in latest Trunk (rev 584703), and probably in FOP 0.94
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed