How to make Class name bold in plant UML?

0 votes
asked Mar 19 in Question / help by Shadow43375 (140 points)

It is possible to style the class name in PlantUML to italic by making the class abstract. Is there a way to style the class name so that it is bold as in the example class below?

Bold class name

2 Answers

0 votes
answered Mar 20 by Martin (8,280 points)

You can use the creole markups, such as <B> for bold, in the class name; like so:

@startuml
class "<B>ClosedIssueState</B>" as ClosedIssueState #lightgreen {
getString : string
transitionNew() : void
transitionWork() : void
transitionConfirmed() : void
}

ClosedIssueState -> B
@enduml

+1 vote
answered Mar 20 by The-Lu (45,820 points)

Another solution...

If you does not use stereotype on class, with new style functionality is:

@startuml
hide stereotype
<style>
/' Bold Header '/
.bh {
  header {
    fontstyle bold
  }
}
</style>
class "ClosedIssueState" as ClosedIssueState <<bh>> #lightgreen  {
getString : string
transitionNew() : void
transitionWork() : void
transitionConfirmed() : void
}

ClosedIssueState -> B
@enduml

If that can help,
Regards.

...