plantuml / plantuml-server

PlantUML Online Server
https://plantuml.com/
GNU General Public License v3.0
1.59k stars 463 forks source link

Monospaced font missing in the Docker image? #334

Closed arnaudroques closed 2 months ago

arnaudroques commented 2 months ago

Describe the bug It looks like monospaced fonts are not working with the Docker image

To Reproduce

Simple example:

@startuml
Bob -> Alice : hello ""monospaced""
@enduml

Expected behavior

The text "monospaced" should be printed using a monospaced font.

Additional context

What about ading fonts-dejavu-core and fonts-noto-mono to the Dockerfile?

Any though anyone ?

The-Lum commented 2 months ago

[Just for the record] See similar issue here, with the new plantuml.com server:

HeinrichAD commented 2 months ago

Does anybody know if this is a new behavior?

Since we already had a few questions about fonts, there exists an example on how to add additional fonts to your docker container. Or to be more precise, on how to map your local installed fonts to the docker container.

https://github.com/plantuml/plantuml-server/blob/master/examples%2Fadditional-fonts%2FREADME.md

Edit: But I agree we should support at least one mono font by default.

Edit2: You could check which fonts are already available inside the docker container and see if any mono front is listed.

@startuml
listfonts
@enduml
The-Lum commented 2 months ago

Hi all,

It seems that ever there is one monospaced font (e.g. Monospaced) the issue occurs...

See all the minimal tests (with the current web-server):

@startuml
listfonts
@enduml

@startuml
hide footbox
Bob -> Alice : hello ""monospaced""
footer \n1.202425beta1 / %version()
@enduml

:x: KO on PNG

✔️ OK on SVG

If that can help, for test and according to the current plantuml webserver (plantuml.com).

Regards, Th.

HeinrichAD commented 2 months ago

I just tested it with some more obvious characters on the lastest docker version. In my opinion monospace is working quite well for png as well as svg.

@startuml
hide footbox
Bob -> Alice : hello mmiimm ""monospaced mmiiimm""
footer \n%version()
@enduml
PNG SVG
png svg

Or do I miss something?

The-Lum commented 2 months ago

Hi @HeinrichAD

It seems that you are right.

We are so used to seeing the courier serif font (on the old plantuml webserver) that the change with a sans-serif monospaced font does tricks on us...

Regards, Th.

HeinrichAD commented 2 months ago

If that's the case I will close this issue. Feel free to reopen it.