Sans serif font for Gantt diagram

0 votes
asked Aug 18, 2020 in Wanted features by Emmanuel
Hello !

Would it be possible to change the currently used font for Gantt diagrams to a sans serif one, like Arial or DejaVu Sans? Since Gantt diagrams are mainly to be shown on screen, and since PlantUML images are low DPI, serif font as used now reduces readability.

Thanks !

commented Aug 18, 2020 by albert (3,180 points)

With: java -Djava.awt.headless=true -jar plantuml.jar  -language

you get (o.a.) all recognized skin parameters, here you can search for all the FontNames that can be changed (I count 84 in PlantUML version 1.2020.16beta8), though it looks like there is not direct one general one for Gantt charts.

commented Aug 19, 2020 by Emmanuel
Thanks for your answer that pointed me to the skinparam directive.

But the Gantt diagram doesn't seem to allow skinparam. You can look at this where I'm using the specific starting command.

Or this where I use the @startuml generic one:

In either case, there is a syntax error which disallows me to change any styling parameters. Perhaps am I doing wrong ?
commented Aug 19, 2020 by The-Lu (37,840 points)

1 Answer

0 votes
answered Aug 21, 2020 by plantuml (265,060 points)
Best answer

With last beta, you can now have

ganttDiagram {
    task {
        FontName Helvetica
        FontColor red
        FontSize 18
        FontStyle bold
        BackGroundColor blue
        LineColor yellow
    milestone {
        FontColor blue
        FontSize 25
        FontStyle italic
        BackGroundColor yellow
        LineColor red
[Task] lasts 20 days
[M1] happens on 5 days after [Task]'s end