Draft: Add support for SVG output
Add the -svg
CLI option to generate UTF-8 encoded SVG 1.1. Some key differences with the PostScript output:
- New layers are created instead of pages, as this concept is not relevant for SVG.
- Some options are ignored for SVG:
-fit
,-full
,-if
,-n
,-npk
. - Some options are not yet implemented:
-color
,-mono
,-grid
. - The Unicode character corresponding to a keysym is used whenever possible, instead of the keysym name.
- Dead key representation uses the corresponding combining character, e.g. “◌́” for
dead_acute
. - Keysym names are made more user friendly by removing some prefixes (
KP_
,ISO_
,XF86
) and suffixes (_L
,_R
). - If there is only one group per key displayed, then up to four levels are displayed, instead of only two for PostScript.
- When using
-label none
, label placeholders are created, so they can be filled later, e.g. by modifying the SVG in a web page using Javascript. - Using debug mode
-d
makes drawing the text fields borders.