minutes of ESC call ...
quikee at gmail.com
Sat Dec 23 05:16:10 UTC 2017
On Fri, Dec 22, 2017 at 12:52 AM, Michael Meeks
<michael.meeks at collabora.com> wrote:
> * Blurry icons (Heiko)
> + a PNG issue for hidpi screens.
> + why not use SVG icons instead ?
> + quikee wrote some code to render SVG icons (Kendy)
> + need to look into what the state is
There are 2 issues currently:
- SVG import doesn't correctly interpret what should happen when
"height" and "width" aren't set but just "viewBox", so many SVG icons
aren't rendered correctly. I have a fix for that, but need to write a
- When using GTK3 we use the cairo HiDPI scaling instead of handling
that ourselves. The issue is that rendering bitmaps need to support
that too, which we don't. For example if we have an icon 24x24 px
which is rendered to 48x48 actual px from SVG (2x HiDPI scaling) must
still pretend to be 24x24 px and drawn to a 24x24 px area on a cairo
surface (cairo surface uses non-scaled size and just internally scales
them to 2x the size) . So our "Image" class must know something about
scaling to draw the icons correctly in this case. I have made a crude
POC and it worked, but not yet ready for production.
> + adds some startup-time potentially.
> + need to measure startup impact.
SVG icons are on demand rendered and then cached to PNG in profile
"cache" folder. So the rendering impact would only be for the first
time an icon is used, after that the impact is the same as using a PNG
icon - until the cache is cleared (which is currently never - users
must do it themselves).
> + SVG renderer we have is not the fastest in the world (Thorsten)
> + with some caching – in a good shape.
> + thought it was solved ? Just switching.
> => ask quikee what he recommends.
When those 2 bugs are solved, all we need to do is package the SVG
icons. At least breeze_svg icons work as they are very simple. Others
(elementary for example) could render wrongly, I didn't try it yet.
OTOH some Tango SVG icons did crash the renderer so currently we
always prefer PNG icon over SVG if both are present (like in Tango)
and the icon theme must be a pure SVG themes (with no PNG present in
the zip file) if SVG would be used.
More information about the LibreOffice