structurizr / export

Export models and views to external formats.

Home Page:https://docs.structurizr.com/export

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different fonts in Linux and Mac

dgutson opened this issue · comments

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.

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)

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.

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.

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?

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

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

ping? any update when this will be released?

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

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?