Rendering PlantUML legends as SVG drops colors

0 votes
asked Jun 21, 2018 in Bug by Gerd Aschemann

With the following legend in PlantUML

legend right
|= |= Type |
|<back:red>    </back>| Abcdef |
|<back:blue>    </back>| Uvwxyz |

I get a nice PNG but an SVG without colors (cf. attached - Github does not allow to upload SVGs directly).


1 Answer

0 votes
answered Jun 21, 2018 by plantuml (264,940 points)

Well, the issue seems to be on the SVG implementation :-)

For text containing only spaces, even with some background color, SVG rendering do not display anything :-(

A possible workaround could be to use "IDEOGRAPHIC SPACE" (see )

Bob -> Alice : hello
legend right
|= |= Type |
|<back:red><color:red><U+3000></color></back> | Abcdef |
|<back:blue><color:blue><U+3000></color></back> | Uvwxyz |

Note that we *could* implement the workaround in PlantUML code (that is changing pure "space" text to "ideographic space" for SVG output), but that would be weird, so if possible, we'd like better that you use the workaround.

Any though ?