Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Different fonts in Linux and Mac #41

Closed
dgutson opened this issue Feb 3, 2023 · 9 comments
Closed

Different fonts in Linux and Mac #41

dgutson opened this issue Feb 3, 2023 · 9 comments

Comments

@dgutson
Copy link

dgutson commented Feb 3, 2023

I think that the exporters should set the font name, or there should be a font property in the styles or theme in order to ensure that the same font is used everywhere.

This causes that renders look very different in some cases, to the point to cause word wrap, and turn diagrams difficult to compare.

simonbrowndotje pushed a commit that referenced this issue Feb 8, 2023
…based upon the branding font defined in the workspace (#41).
simonbrowndotje pushed a commit that referenced this issue Feb 8, 2023
…n the branding font defined in the workspace (#41).
@simonbrowndotje
Copy link
Contributor

The branding font will now be used as the default font for the two PlantUML exporters.

(please note that you will need to build from source to use this library until it's released onto Maven Central)

@dgutson
Copy link
Author

dgutson commented Feb 8, 2023

Thanks! How is the default font specified? Could you please add a note in the dsl reference, or provide an example?
Is using the branding body the only way to specify the font? Because I didn't find any other place where font <name> could be
specified, not even in themes nor element.

@simonbrowndotje
Copy link
Contributor

Yes, via branding, which is a child of views.

Example:

workspace {

    model {
        user = person "User"
    }

    views {
        branding {
            font Courier
        }
    }

}

You can also set it via Java, as shown in the unit test.

Feel free to submit a docs PR if you think an example is needed.

@dgutson
Copy link
Author

dgutson commented Feb 8, 2023

Last question, aligned with my previous question here, what is the default font name in Linux? IIUC, unless I explicit the font, I will still get different defaults in Linux and Mac, right?

@dgutson
Copy link
Author

dgutson commented Feb 8, 2023

Sorry, I think I can answer myself, the default is given by plantUML, not by structurizr.

@dgutson
Copy link
Author

dgutson commented Feb 15, 2023

@simonbrowndotje any news about when this will be available in docker hub?

@dgutson
Copy link
Author

dgutson commented Feb 25, 2023

ping? any update when this will be released?

@simonbrowndotje
Copy link
Contributor

This particular code change was released onto Maven Central last week; see https://github.com/structurizr/export/releases for more details.

@bcordobaq
Copy link

Hi @simonbrowndotje, would it be possible that these changes aren't available yet in the Docker image? We've updated our project with the branding instruction, and we moved from 1.25.0 to the current latest 1.27.0, and it didn't work... could you help me?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants