Bug 121130 - markers.png generated from markers.svg is 118x93 instead of 117x92 and therefore markers don't fit
Summary: markers.png generated from markers.svg is 118x93 instead of 117x92 and theref...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Icon-Themes-Code-SVG
  Show dependency treegraph
 
Reported: 2018-11-02 16:02 UTC by Regina Henschel
Modified: 2023-06-29 12:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
file as generated by LO6.2 (2.73 KB, image/png)
2018-11-02 16:02 UTC, Regina Henschel
Details
Compare markers (3.39 KB, image/png)
2018-12-08 13:29 UTC, Regina Henschel
Details
bad with generated markers.png (3.41 KB, image/png)
2023-06-03 21:12 UTC, Regina Henschel
Details
good with correct size from image_foo.zip (2.75 KB, image/png)
2023-06-03 21:13 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2018-11-02 16:02:14 UTC
Created attachment 146256 [details]
file as generated by LO6.2

For testing zip the icon-theme colibre_svg from source and put it into your LibreOffice installation and rename it properly. Start LibreOffice and choose this icon theme. Close and restart LibreOffice.

Start Writer and write some dummy text with several paragraphs. Insert an image and anchor it to paragraph. Click the image. Then grap the anchor and drag it to a different paragraph. Notice, that this is not possible.

The reason for this problem is, that the png-file, which is generated from the svg-file has wrong size. That results in the effect, that a part of the png-file is used for the anchor, which has a transparent line as first row and first column. And with transparent row and column, grapping the anchor does not work.

To get the needed size and position you have to remove one pixel on the left, two pixel on the top and add one (transparent) pixel at the bottom.

With the wrong position and size, the square resize-markers are wrong too.

I have not tested, whether Breeze or Tango have the same problem.

Additional problems:

The round parts are generated wrongly, they have a rectangular corner top-left, where there should have a curve.

The part bottom-left, which gives the center-marker for a rotation, looks very ugly.

The generated folder is cache/colibre_svg/100 although my display scaling is 125%.

Only the combined markers.png was generated although the zip-file of the theme contains the single marker files too.
Comment 1 andreas_k 2018-11-07 21:17:30 UTC
This is how I did the export from svg2png

inkscape -f "$i" -e "${i%.*}.png"
optipng -o7 "${i%.*}.png"

I first run inkscape to export the svg file into png and than I optimize the png file with optipng.
Comment 2 andreas_k 2018-11-07 21:19:29 UTC
About marker there is markers.svg and in addition each marker icon is available via marker-xxx
Comment 3 Regina Henschel 2018-12-05 19:49:47 UTC
The single markers are not generated automatically, but the markers.png is generated from markers.svg.

The additional pixel is on the left and on the top edge. Therefor the markers are wrongly cut. For markers, which have only small size compared to icons, this 1px is important.

The export from Inksape is much better than the conversion by LibreOffice.

I have removed "Colibre", because it is a general problem for svg -> png.
Comment 4 andreas_k 2018-12-08 12:44:40 UTC
ok what's the problem here?

it look like the svg -> png output from libO add 1px cause the svg and png file in colibre_svg/svx/res and colibre/svx/res have the right size
Comment 5 Regina Henschel 2018-12-08 13:29:19 UTC
Created attachment 147381 [details]
Compare markers

The image contains screenshots of a marked object.
The left part uses markers.png from "colibre". The middle part uses the markers.png, which was generated from "colibre_svg". The right part uses a markers.png where I have removed the additional pixel top and left from the generated markers.png.

Notice in the middle, that the markers are wrongly cut from markers.png. The bounding markers are not symmetric and the glue point markers have a gray line at top.

The middle screenshot shows compared to the left one in addition, that the generated markers.png seem to have got some anti-aliasing, which makes the markers blurry.

The problem is, that the generated markers are ugly.
Comment 6 andreas_k 2018-12-08 21:16:01 UTC
> The problem is, that the generated markers are ugly.

That's the general problem of ALL svg icon themes. The LibO svg renderer doesn't render nicely, but somewhere in the future the libo svg renderer will improve.
Comment 7 Xisco Faulí 2019-01-22 16:32:37 UTC
(In reply to andreas_k from comment #6)
> > The problem is, that the generated markers are ugly.
> 
> That's the general problem of ALL svg icon themes. The LibO svg renderer
> doesn't render nicely, but somewhere in the future the libo svg renderer
> will improve.

Hi Andreas,
Should it be moved to NEW until the svg renderer improves in LibreOffice ?
Comment 8 pourvan 2020-12-08 05:08:25 UTC Comment hidden (spam)
Comment 9 QA Administrators 2022-12-09 03:23:56 UTC Comment hidden (obsolete)
Comment 10 Regina Henschel 2022-12-09 22:51:04 UTC
The markers.png is still wrong in Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 17dfc9a9da009cc23d2222e3fb4e2cef9c97d581
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded
Comment 11 Regina Henschel 2023-06-03 21:11:58 UTC
The generated markers.png has still wrong size in Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 70fd835b4cf75e386ee115c705241a4059fb68a8
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

The markers.png, which is contained in the image_foo.zip file has the correct size. So it is a workaround to extract the markers.png from the zip-file and use that instead of the generated markers.png in the cache folder. The attached screenshot-files show the difference between generated markers.png (bad) and the markers.png from the zip-file (good).
Comment 12 Regina Henschel 2023-06-03 21:12:55 UTC
Created attachment 187703 [details]
bad with generated markers.png
Comment 13 Regina Henschel 2023-06-03 21:13:49 UTC
Created attachment 187704 [details]
good with correct size from image_foo.zip