summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-08-04 04:29:48 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-08-05 10:23:58 +0200
commit2d73afe9a0166f926ca97fd82d3673f7a2d05827 (patch)
treed02ddddd7542dabd0eb89b3560e773389bbd7bed /filter
parent802fa332fc05a119c525f20a46ac3aaea7900602 (diff)
tdf#135427 Make pstoedit delegate letter placement to us
As pstoedit documents itself, its wmf/emf driver uses a very approximate interletter spacing, making the text look really awful. But it provides a -nfw option that delegates the letter placement to the emf reader, and we happen to be doing a proper job, thus getting a proper vectorized output. This is not a concern on Windows (and the option is ignored there). The option is available since version 3.40 (~2005). So we can just always pass it on. Change-Id: I8ffd3fbf046b5a80e8011651eeaf060a8f5107e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100035 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit c39b27a4d0dfc3b75d8486c0d7592c5209fb6b14) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100053 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 413e6725fc73..a6c764adaff2 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -220,9 +220,14 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
//-usebbfrominput forces pstoedit to take the original ps bounding box
//as the bounding box as it sees it, instead of calculating its own
//which also doesn't work for this example
+ //
+ //Under Linux, positioning of letters within pstoedit is very approximate.
+ //Using the -nfw option delegates the positioning to the reader, and we
+ //will do a proper job. The option is ignored on Windows.
OUString arg1("-usebbfrominput"); //-usebbfrominput use the original ps bounding box
OUString arg2("-f");
- OUString arg3("emf:-OO -drawbb"); //-drawbb mark out the bounding box extent with bg pixels
+ OUString arg3("emf:-OO -drawbb -nfw"); //-drawbb mark out the bounding box extent with bg pixels
+ //-nfw delegate letter placement to us
rtl_uString *args[] =
{
arg1.pData, arg2.pData, arg3.pData, input.pData, output.pData