SubpixelPositioning was until now activated when *any* MapMode was set,
but there is another case this is needed: When a TextSimplePortionPrimitive2D is rendered by a SDPR.
In that case a TextLayouterDevice is used (to isolate all Text-related
stuff that should not be at OutputDevice) combined with a 'empty'
OutDev -> no MapMode.
The DXArray for Primitives (see that TextPrimitive) is defined in the
Unit-Text_Coordinate-System, thus in (0..1) ranges. That allows to
have the DXArray transformation-independent and thus re-usable and
is used since the TextPrimitive was created.
If there is a DXArray missing at the text Primitive (as is the case
with SVG imported ones, but allowed in general) one gets automatically
created during the SalLayout creation for rendering. Unfortunately there
(see GenericSalLayout::LayoutText, usages of GetSubpixelPositioning) the
coordinates get std::round'ed, so all up to that point correctly
calculated metric information in that double-precision dependent coordinate space gets *shredded*.
To avoid that, SubpixelPositioning has to be activated. While this
might be done in the future for all cases (SubpixelPositioning ==
true), for now add this case for all usages of TextLayouterDevice to
not break old stuff.
NOTE: Due to higher precision I had to adapt some values for SVGIO
tests: That is expected since higher precision leads to less-wide
results internally. I checked testdocs that deviations are minimal and
have better quality with SubpixelPositioning then before.
Change-Id: Iab5aa6336cdb18224fd06472bf6badc9eb0fce3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189993
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins