Sans serif font for Gantt diagram

0 votes
asked Aug 18 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 by albert (2,900 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 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 by The-Lu (7,960 points)

1 Answer

0 votes
answered Aug 21 by plantuml (230,800 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