Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Class attribute font size issue with SVG output

0 votes

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
asked Jun 19 in bug by lxxc (270 points)

1 Answer

0 votes
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,
answered Jun 29 by plantuml (125,210 points)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...