<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - text failing to display on SVG and X11 surface even though it works correctly on PDF and PS surfaces"
href="https://bugs.freedesktop.org/show_bug.cgi?id=104042">104042</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>text failing to display on SVG and X11 surface even though it works correctly on PDF and PS surfaces
</td>
</tr>
<tr>
<th>Product</th>
<td>cairo
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>chris@chris-wilson.co.uk
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anntzer.lee@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>cairo-bugs@cairographics.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=135887" name="attach_135887" title="cairo-script that reproduces the reported issue">attachment 135887</a> <a href="attachment.cgi?id=135887&action=edit" title="cairo-script that reproduces the reported issue">[details]</a></span>
cairo-script that reproduces the reported issue
This bug was first reported on the cairo mailing list.
I have an issue of text failing to be displayed onto a SVG surface. I have
attached a cairo-script to this bug report; the script is quite large because
of the font (DejaVu) definition embedded. Stripping the font definition yields
%!CairoScript
<< /content //COLOR_ALPHA /width 460 /height 345 /fallback-resolution
[100 100] >> surface context
1 g set-source
paint
//ALPHA [] record
dup /s6 exch def dup context
[12 0 0 12 0 0] set-font-matrix
<< /type 42 /index 0 /flags 32 /source < ... > >> font dup /f0 exch def
set-font-face /scaled-font get /sf0 exch def
[0 7 <~6i~>] show-glyphs
pop pattern
[1 0 0 1 -227.4 -9.312] set-matrix
set-source
paint
pop
where the ellipsis stands for the binary font definition.
Replaying the script with csi-replay (cairo 1.14.10), patched to output the
results to a file
{
- return cairo_pdf_surface_create_for_stream (NULL, NULL, width,
height);
+ return cairo_pdf_surface_create("/tmp/out.pdf", width, height);
}
(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.
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).
Any help would be welcome. Thanks!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>