Add ability to change font-family for SVG output

Issue #82 resolved
nbkolchin
created an issue

Currently, blockdiag always use 'sans-serif'. This cause problems with applications that use blockdiag as SVG generator like 'asciidoctor'. See https://github.com/asciidoctor/asciidoctor-pdf/issues/777

Comments (2)

  1. nbkolchin reporter

    Actually, I see no way to change fonts with "fontmap". For example, with following "fontmap":

    [fontmap]
    aaa-serif-normal: Hack.ttf
    [fontalias]
    sansserif: aaa-serif
    

    When processing:

    blockdiag {
      A[label="изображение"];
      A -> B;
    }
    

    I get following SVG output:

    ...
     <text fill="rgb(0,0,0)" font-family="serif" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" textLength="77" x="128" y="66">изображение</text>
    ...
    

    Expected output font-family="aaa-serif".

    What I'm missing?

  2. Log in to comment