<div dir="ltr"><div>Hi all,</div><div><br></div><div>I have an issue of text failing to be displayed onto a SVG surface.  I have uploaded a cairo-script to <a href="https://gist.github.com/anntzer/f8ac09399b3752574a90dc328afc0e19">https://gist.github.com/anntzer/f8ac09399b3752574a90dc328afc0e19</a>; the script is quite large because of the font (DejaVu) definition embedded.  Stripping the font definition yields</div><div><br></div><div>    %!CairoScript</div><div>    << /content //COLOR_ALPHA /width 460 /height 345 /fallback-resolution [100 100] >> surface context</div><div>    1 g set-source</div><div>    paint</div><div>    //ALPHA [] record</div><div>    dup /s6 exch def dup context</div><div>    [12 0 0 12 0 0] set-font-matrix</div><div>    << /type 42 /index 0 /flags 32 /source < ... > >> font dup /f0 exch def set-font-face /scaled-font get /sf0 exch def</div><div>    [0 7 <~6i~>] show-glyphs</div><div>    pop pattern</div><div>    [1 0 0 1 -227.4 -9.312] set-matrix</div><div>    set-source</div><div>    paint</div><div>    pop</div><div><br></div><div>where the ellipsis stand for the binary font definition.</div><div><br></div><div>Replaying the script with csi-replay (cairo 1.14.10), patched to output the results to a file</div><div><br></div><div>    {</div><div>    -    return cairo_pdf_surface_create_for_stream (NULL, NULL, width, height);</div><div>    +    return cairo_pdf_surface_create("/tmp/out.pdf", width, height);</div><div>    }</div><div><br></div><div>(and similarly for ps and svg) shows that the pdf and ps surfaces (correctly) create a file that displays a single letter "a" on the surface, but the svg surface creates a file that displays nothing.  Although I can't showcase the issue as easily on other surfaces, my tests indicate that the text is also correctly displayed by the image surface, and also missing when using the X11 surface.</div><div><br></div><div>As some side notes: 1) It may be worth documenting somewhere (e.g. util/cairo-script/README) that the way to build csi-replay is `make csi-replay`; this took me a while to realize.  2) It may be worth supporting output to a file from csi-replay, in the manner of the patch I used (but either with proper integration to the command line, or perhaps just outputting to $pid.pdf).</div><div><br></div><div>Any help would be welcome.  Thanks!</div><div><br></div><div>Antony Lee</div></div>