Is it possible to customize json font by skinparam?

0 votes
asked Aug 8, 2022 in Wanted features by George Liou (240 points)
Mono-spaced fonts usually have better legibility, is it possible to assign font to json just like other graph types?

For example:

@startuml
skinparam defaultFontName inconsolata
@startjson JSON-Test
{
  "Key1":"A0123456789",
  "Key2":"i1Il-0O-gq9"
}
@endjson
@enduml

1 Answer

0 votes
answered Aug 8, 2022 by The-Lu (64,340 points)
selected Aug 9, 2022 by George Liou
 
Best answer

Hello G.,

For that you can use style as:

@startjson JSON-Test
<style>
jsonDiagram {
  FontName Monospaced
}
</style>

{
  "Key1":"A0123456789",
  "Key2":"i1Il-0O-gq9"
}
@endjson

And test changing Monospaced by inconsolata.

Enjoy.
Regards.

commented Aug 9, 2022 by George Liou (240 points)
It works. :)

Thank you.
...