Hi,

one of my clients reported a strange problem with SVG text being misplaced in PDF output when very high font size values are used. The sample SVG file also uses very high viewBox values. I created a test case which reproduces the issue when increasing the font size from 2578pt to 2579pt: suddenly the characters are misaligned. The issue doesn't occur when outputting PNG or PS files, so perhaps this is only related to the PDF code. I've been debugging for several hours, but I can't find the cause. I'm attaching a fo file which reproduces the issue and the current PDF output. Perhaps someone can have a look at it and tell me which code part I should check, in order to fix the issue.

Thanks for your help.

Best regards,
Matthias
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; font-family="Helvetica">
	<fo:layout-master-set>
		<fo:simple-page-master master-name="normal" page-width="210mm" page-height="297mm">
			<fo:region-body margin="2cm"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="normal">
		<fo:flow flow-name="xsl-region-body">
			<fo:block>
				<fo:instream-foreign-object width="100%" content-width="scale-to-fit">
					<svg xmlns="http://www.w3.org/2000/svg";
						viewBox="0 0 65625 84375"
						version="1.1">
						<g>
							<text
								style="font-size:2578pt;font-family:sans-serif;"
								y="3312"
								x="0">Maradona</text>

						</g>
						<g>
							<text
								style="font-size:2579pt;font-family:sans-serif;"
								y="6312"
								x="0">Maradona</text>

						</g>
					</svg>
				</fo:instream-foreign-object>
			</fo:block>
		</fo:flow>
	</fo:page-sequence>

</fo:root>

Attachment: svg-font-issue.pdf
Description: Adobe PDF document

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to