• tksvg improvement

    From saitology9@21:1/5 to All on Sun Aug 20 19:23:02 2023
    Tksvg is wired to look for viewbox property in order to work.
    Some svg files do not contain this piece of information. So the package
    is unable to process such files.

    However, the width/height information is always present. I would suggest turning this into a default viewbox in case it is missing. Doing this
    simple change does load previously unloadable svg files.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Tue Aug 22 13:06:37 2023
    Am 21.08.23 um 01:23 schrieb saitology9:
    Tksvg is wired to look for viewbox property in order to work.
    Some svg files do not contain this piece of information. So the package
    is unable to process such files.

    However, the width/height information is always present. I would suggest turning this into a default viewbox in case it is missing.  Doing this simple change does load previously unloadable svg files.




    I cannot confirm that tksvg refuses to load SVG files missing the
    viewBox attribute.

    --
    Csaba Nemethi https://www.nemethi.de mailto:[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Tue Aug 22 13:41:33 2023
    Am 22.08.2023 um 13:06 schrieb nemethi:
    Am 21.08.23 um 01:23 schrieb saitology9:
    Tksvg is wired to look for viewbox property in order to work.
    Some svg files do not contain this piece of information. So the
    package is unable to process such files.

    However, the width/height information is always present. I would
    suggest turning this into a default viewbox in case it is missing.
    Doing this simple change does load previously unloadable svg files.




    I cannot confirm that tksvg refuses to load SVG files missing the
    viewBox attribute.


    Thanks, Csaba, for answering.

    Yes, tksvg uses nanosvg which implements a restricted set of the svg
    features:

    https://github.com/memononen/nanosvg

    You may also look to the wiki page how to deal with the restrictions:

    https://wiki.tcl-lang.org/page/SVG

    It opens an universe for Tk and is still limited in features and Tk
    integration (photo image).

    Any comment to improve it is welcomed !

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)