Closed juanrferia closed 4 months ago
This is happening because the Structurizr UI is using Open Sans - a web font that isn't installed by default into your OS. The two quickest options to resolve this are:
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" />
).A better longer term solution would be to modify the export to include the following:
<defs>
<style type="text/css">@import url('https://fonts.googleapis.com/css2?family=Open+Sans');</style>
</defs>
Thanks Simon for your suggestions. I am insterested on the longer term solution you mentioned. Can you give me a bit more information about how to achieve that?
I've added some code that will insert the font definition into the exported SVG. I'm not planning an immediate release, so it would be great if you could build from source to test the fix works for you. Thanks!
Thank you Simon. I would be happy test it. I'm using Structurizr Lite / on-premises. Can you clarify the right steps to build and test UI code? For now I am using Arial font as the solution 1 you suggested, which is working fine.
Can you clarify the right steps to build and test UI code?
Lite: https://github.com/structurizr/lite?tab=readme-ov-file#building-from-source On-premises: https://github.com/structurizr/onpremises?tab=readme-ov-file#building-from-source
I think I need to downgrade java version. After executing ./gradlew build
I got an error like:
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '[...]/settings.gradle' ([...].gradle/caches/7.6/scripts/1fzq2oqivyy0lzdtrwjxfh9pr).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65
I will try later. Thanks
It works! Thanks!
Description
When you see a diagram on structurizr.com, structurizr on-premises or structurizr lite, you can decide on exporting the diagram as a PNG or SVG. When exported as a PNG, the image is 100% fitting the aspect of the diagram I can see in Structurizr. However, when exported as a SVG, the font changes.
Steps to reproduce
Expectation: They look like same Actual: PNG is same as the diagram I see in Structurizr, but SVG not: it uses a different font
Screenshot
Structurizr.com:![image](https://github.com/structurizr/ui/assets/11686949/f1988bde-9327-4eb8-88d7-8796deb8c8ac)
PNG Exported![image](https://github.com/structurizr/ui/assets/11686949/442bc19d-44a0-49f2-b059-602abb3f1503)
SVG Exported![image](https://github.com/structurizr/ui/assets/11686949/63d3171d-424b-4121-b5eb-ae3421a353f0)
Code sample
No response
Configuration
No response
Severity
Minor
Priority
I have no budget and there's no rush, please fix this for free
More information
No response