Does <<Composite>> when used with rectangle bold all text on purpose?

0 votes
asked Nov 13, 2022 in Bug by ihu (160 points)

If <<Composite>> is used with rectangle, it bolds all the text for some reason? On purpose? Not very critical but strange...

@startuml
title rectangle text is bolded if Composite used
rectangle "Composite" as Composite <<Composite>>
rectangle "Observer" as Observer <<Observer>>
rectangle "Subject" as Subject <<Subject>>
@enduml

@startuml

title this works

hide circle
hide methods
hide attributes
class "Composite" as Composite <<Composite>>
class "Observer" as Observer <<Observer>>
class "Subject" as Subject <<Subject>>

@enduml

1 Answer

0 votes
answered Nov 14, 2022 by The-Lu (89,080 points)

Hello I., and all,

It is due to 'composite' seems to be now a special word.

See:

Here is a possible workaround (but now the stereotype will be not italic!), using style, as:

@startuml
<style>
element {
  FontStyle plain
}
</style>
title Put all elt on plain
rectangle "Composite" as Composite <<Composite>>
rectangle "Observer" as Observer <<Observer>>
rectangle "Subject" as Subject <<Subject>>
@enduml

If that can help, wink
Regards.

commented Nov 17, 2022 by plantuml (298,440 points)
Thanks for the feedback.

This is fixed with last online version.

There was a confusion in the code between stereotype definition and style definition.

Tell us if you find other issues!
...