9e83d35c4a
That recently introduced test systematically failed on my Fedora 36 machine with > /home/sbergman/lo2/core/test/source/xmltesttools.cxx:89:(anonymous namespace)::Test::testCssClassRedefinition > equality assertion failed > - Expected: 1 > - Actual : 0 > - In <>, XPath '/primitive2D/transform/textsimpleportion[1]' number of nodes is incorrect because the dumped data was > <?xml version="1.0" encoding="UTF-8"?> > <primitive2D> > <transform xy11="26" xy12="0" xy13="0" xy21="0" xy22="26" xy23="0" xy31="0" xy32="0" xy33="1"> > <mask> > <polypolygon height="100" width="50" minx="0" miny="0" maxx="50" maxy="100" path="m0 0h50v100h-50z"> > <polygon> > <point x="0" y="0"/> > <point x="50" y="0"/> > <point x="50" y="100"/> > <point x="0" y="100"/> > </polygon> > </polypolygon> > <textsimpleportion width="16" height="16" x="20" y="20" text="test" fontcolor="#ff0000" familyname="Sans"/> > </mask> > </transform> > </primitive2D> rather than the expected > <?xml version="1.0" encoding="UTF-8"?> > <primitive2D> > <transform xy11="26" xy12="0" xy13="0" xy21="0" xy22="26" xy23="0" xy31="0" xy32="0" xy33="1"> > <textsimpleportion width="16" height="16" x="20" y="20" text="test" fontcolor="#ff0000" familyname="Sans"/> > <hiddengeometry> > <polygonhairline color="#000000"> > <polygon>0,0 50,0 50,100 0,100</polygon> > </polygonhairline> > </hiddengeometry> > </transform> > </primitive2D> because in SvgSvgNode::decomposeSvgNode (svgio/source/svgreader/svgsvgnode.cxx) aSvgCanvasRange = 50x100@(0,0) vs. aContentRange = 31x11@(20,9) did not match the > if(aSvgCanvasRange.isInside(aContentRange)) branch ("no clip needed, but an invisible HiddenGeometryPrimitive2D...") but rather the > else if(aSvgCanvasRange.overlaps(aContentRange)) branch ("Clip is necessary") introducing the additional <mask> element. The size of aContentRange (and thus whether it is contained in or merely overlaps aSvgCanvasRange) is apparently affected by what actual font gets substituted for "Sans" in any given environment. The only font that is guaranteed to always be available and is not subject to --with-fonts (which isn't already demanded via gb_CppunitTest_use_more_fonts in svgio/CppunitTest_svgio.mk) appears to be "Open Symbol" (cf. extras/Package_fonts.mk), so use that (even if it doesn't have glyphs for the given text, but which should be irrelevant for this test). Change-Id: If6f6fdc481b313aa08803b4b3f406e01ff0be1ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136350 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> |
||
---|---|---|
.. | ||
inc | ||
qa/cppunit | ||
source | ||
CppunitTest_svgio.mk | ||
CppunitTest_svgio_read.mk | ||
CppunitTest_svgio_tools.mk | ||
IwyuFilter_svgio.yaml | ||
Library_svgio.mk | ||
Makefile | ||
Module_svgio.mk | ||
README.md | ||
svgio.component |
SVG Reader
Introduction
The svgio module is used to read SVG (Scalable Vector Graphics[1]) files. It is an XML based format for vector graphics.
This module contains svgio/source/svgreader
which is used for embedding an
SVG file with "Insert -> Picture -> From File".
SVG is an open standard provided by the World Wide Web Consortium (W3C).
How does it work?
svgio
module uses sax for reading xml and turns it into drawinglayer
primitives.
The rendering is done via drawinglayer
primitives. For more information, you should
refer to drawinglayer documentation.
Known Bugs
Known remaining bugs for this module are gathered here:
Dependencies
Direct dependencies for emfio are drawinglayer and sax.
Related Software
References
Documentation for the SVG format is available on the W3C website: