TIP 507: Include simple svg support with nanosvg

Login
FlightAware bounty program for improvements to Tcl and certain Tcl packages.
Author:         René Zaumseil <rzaumseil@kkg.ch>
State:          Draft
Type:           Project
Vote:           
Created:        9-May-2018
Post-History:   
Keywords:       Tk
Tcl-Version:    8.7

Abstract

Tk needs scalable images on high res mobile devices.

Rationale

Tk is running on desktop and mobile devices. The out of the box image formats do not scale and are to tiny on high res mobile devices. The same goes for the image formats provided by the img extension.

There is already an tk image extension at https://github.com/auriocus/tksvg The implementation is using nanosvg. It has no other external dependencies and is only 2 header files.

The original nanosvg project is hosted at https://github.com/memononen/nanosvg

Specification

The already existing tksvg extension will be adapted and included in Tk. A new image format will be created. The name is svgnano.

Discussion

  • nanosvg is no full svg library
  • the name of the image format should mention this (p.e. nanosvg or svgnano)
  • are there better libraries with our requirements (C only, license)?

Implementation

A patch implementing these changes will be available in the fossil repository in the tip-507 branch.

Documentation updates not yet done.

Alternatives

  • using another library with full svg support

Copyright

This document has been placed in the public domain.