diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-08-04 04:29:48 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-08-04 11:37:20 +0200 |
commit | c39b27a4d0dfc3b75d8486c0d7592c5209fb6b14 (patch) | |
tree | f6d9077aeb03b1035048bdfa45764045d723cb88 /filter | |
parent | cda88ec7a43162df37098c4525c33451266a1575 (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>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 7 |
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 |