Class attribute font size issue with SVG output

0 votes
asked Jun 19, 2017 in Bug by lxxc (200 points)

Hi,

I have some problem with attribute font size when I try to render following plantuml sample in SVG:

@startuml
 
skinparam class {
    AttributeFontSize 16
    AttributeFontName Courier
}
 
class FontSizeIssue {
    int     attribute1
    float   <color:blue>attribute2</color>
}
@enduml
 
With the monospaced font "Courier", both attribute names should be aligned as it is correctly done with PNG output
 
But with SVG output it is not the case.
 
It sounds like a bug. There is a possible workaround to force a correct SVG ouput by using Creole syntax anywhere on attribute1 definition but this is a bit heavy when you have plenty attributes...
 
Greetings
Laurent

1 Answer

0 votes
answered Jun 29, 2017 by plantuml (295,000 points)
Thanks for the report.

It looks like a SVG issue : we change "space" to "non-breaking-space" in SVG when Courier/Monospace font is used. It seems to fix the issue.

You can use the last beta:

https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

Tell us if it's not working for you,

Regards,
...