Graphviz Point - Italic text in an HTML table is not italic

I am using dot version 2.26.3

The following contents of .dot :

 digraph html { results [shape=none, margin=0, label=< <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4"> <TR> <TD>Title</TD> </TR> <TR> <TD><I>Description.</I></TD> </TR> </TABLE> >]; } 

.. should create a non-Italian "Title" and italic "Description" when creating SVG according to the documentation .

dot -Tsvg filename.dot -o output/filename.svg

However, the description is not italic, as you can see:

enter image description here

Any idea why?

UPDATE

I could not install the latest version for various reasons. In the end, I fixed it with an italic font. Similarly, you can use a strong font as the equivalent for bold.

<TD><FONT FACE="Times-Roman">Standard.</FONT></TD>

<TD><FONT FACE="Times-Italic">In italics.</FONT></TD>

<TD><FONT FACE="Times-Bold">In bold.</FONT></TD>

+4
source share
2 answers

Here's why - with a link to the documentation you provided:

Font layout for bold, italic, underline, index, and superscript ( <B> , <I> , <U> , <SUB> and <SUP >) are available only after October 14, 2011 , and are currently only available through cairo and svg renderers

Version 2.26.3, however, seems to be from January 2010 - at least when checking download dates for ubuntu or windows .

I recommend updating.

+4
source

I have version 2.28 installed and my local documentation ( C:\Program Files\Graphviz 2.28\share\graphviz\doc\html\info\shapes.html#html ) does not mention the <I> or <B> tags in the section HTML-Like Labels . It seems that tags still work when releasing png , but support (apparently) was either removed or never added to svg functionality and is now (apparently) not supported for any output.

+1
source

Source: https://habr.com/ru/post/1438280/


All Articles