Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Words overlap in container while using PlantUML" (Draw.io uses a PlantUML server/docker with only one installed font?) #4699

Open
2 tasks done
kirchsth opened this issue Oct 12, 2024 · 0 comments

Comments

@kirchsth
Copy link

kirchsth commented Oct 12, 2024

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug

If I add following PlantUML diagram in Draw.io then the characters overlaps (output is SVG).
If the diagram is displayed on the online PlantUML server then it is correct displayed (output is SVG too).

@startuml
header plantuml %version()

[=SPA\n=Admin SPA\nSPA\nAdmin SPA]
@enduml

draw.io output:

image

PlantUML online server output:

image

My assumption is that only one font is installed on the used PlantUML server/docker and therefore wrong distances,... are calculated.
Therefore I listed all available (PlantUML) fonts and create a png file (that it is independent of the e.g. fonts which are installed in the browsers,...) and this looks for me that only one font is installed on the used PlantUML server/docker.

@startuml
listfonts <size:20>Admin SPA
@enduml

draw.io output:

image

(details see below)

My original issues is documented in C4-PlantUML with a detailed analysis.
And I think it is also related to the "off-topics" comments of #4020.

To Reproduce

  1. Go to 'https://app.diagrams.net'
  2. Add a new PlantUML diagram via "Arrange->Insert->Advanced->PlantUML"
  3. Enter following text
@startuml
header plantuml %version()

[=SPA\n=Admin SPA\nSPA\nAdmin SPA]
@enduml
  1. Check that "PlantUML (SVG)" is selected and press "Insert"
  2. And you see the image with the overlapping characters
    image

Expected behavior
The PlantUML server/dockercalculates the correct distances (based on the installed fonts) that the SVG diagram can be drawn without any overlaps,

Screenshots

see above and below

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Edge (but also Chrome has the same problem)
  • Browser Version: 129.0.2792.79

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

  • yes

Additional context

The original issues is documented in C4-PlantUML with a detailed analysis.

But I think the most important difference is that the PlantUML online server has more installed fonts and you see that ex. "SansSerif" and "Serif" use different fonts in the png output of the PlantUML online server (and in draw.io even the "Serif" font has no serifs):

@startuml
listfonts <size:20>Admin SPA
@enduml

PlantUML online server output:

(the image has a link to the PlantUML online server, that you can compare it online too)

image

If you are using a docker image it could be the simplest to add more fonts based on following PlantUML instruction: Additional fonts inside the PlantUML docker container

@kirchsth kirchsth changed the title "Words overlap in container while using PlantUML" (Draw.io uses a PlantUML server/plugin with only one installed font?) "Words overlap in container while using PlantUML" (Draw.io uses a PlantUML server/docker with only one installed font?) Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant