• Re: Announce: tresvg released

    From Nicolas ROBERT@[email protected] to comp.lang.tcl on Wed Nov 5 20:59:51 2025
    From Newsgroup: comp.lang.tcl


    Nicolas ROBERT <[email protected]d> posted:


    meshparts <[email protected]> posted:

    Am 29.10.2025 um 18:10 schrieb Nicolas ROBERT:

    I'm pleased to announce the release of tresvg, a Tcl library SVG rendering.

    What is tresvg ?
    tresvg package is a wrapper around *resvg* (https://github.com/linebender/resvg)

    /*resvg* is an SVG rendering library. It can be used as a Rust library, as a C library, and as a CLI application to render static SVG files.
    The core idea is to make a fast, small, portable SVG library with the goal to support the whole SVG spec./

    Use *tresvg* if :

    - You need full SVG specification compliance.
    - You work with complex, modern SVG files.
    - Rendering quality and accuracy are priorities.
    - You need reliable text rendering.
    - You can accommodate with the build requirements.

    _Requirements_:

    Tcl 8.6 or higher.
    *tcl-cffi* >= 2.0
    *critcl* and *Tk* are optional for rendering SVG image to photo command.

    _Building_:

    You can either build the library yourself (if you have Rust installed or if you want to install it),
    or use my repository’s GitHub Actions to automatically build platform-specific binaries for you (See detail here: https://github.com/nico-robert/tresvg?tab=readme-ov-file#building-).

    _Links_:

    GitHub: https://github.com/nico-robert/tresvg

    Regards
    Nicolas

    This sound very good!
    I'm not sure I want to try to compile it though, as my limitted
    knowledge allways created issues with compile actions.
    It would be great if tresvg would be part of the BAWT framework.
    I sure would want to test this package.

    Regards
    Alex


    Yes, that is one of the requirements.
    You need to have Rust installed.
    Compiling is not very complicated, but I can understand that it might be a problem.
    If you have a GitHub account, there is another solution: fork my project and run the compilation via GitHub Actions.
    You will then be able to download the artefact for your OS.
    Otherwise, in a few days I will publish another release with the compiled libraries, which will allow you to test it.
    I will keep you informed on this forum.
    But please, I hardly ever come here, so feel free to post an issue via GitHub.

    Thank you.

    I have released a new version, which you can find here : https://github.com/nico-robert/tresvg/releases/tag/v0.19
    This release includes the binaries for using and testing the package.

    Note : If you would like to use Tk, this version extends the resvg C-API library with a new function that allows you to export
    a simplified XML and avoid using the Tk critcl backend.
    You can use it if you have tksvg in 8.6 or directly without the package in Tk9.
    I think that even if not everything is supported in the svg version of Tk9 or tksvg, it will allow you to display more things.
    Try it out to see if this function is useful for you.

    Nicolas
    --- Synchronet 3.21a-Linux NewsLink 1.2