<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34101</bug_id>
          
          <creation_ts>2017-10-31 05:58:48 +0300</creation_ts>
          <short_desc>dot output is inconsistent across architectures</short_desc>
          <delta_ts>2018-06-12 22:37:06 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>graphviz</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://bugzilla.redhat.com/show_bug.cgi?id=827927</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>34231</blocked>
    
    <blocked>34100</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry V. Levin">ldv</reporter>
          <assigned_to name="Michael Shigorin">mike</assigned_to>
          <cc>aen</cc>
    
    <cc>antohami</cc>
    
    <cc>george</cc>
    
    <cc>grenka</cc>
    
    <cc>lav</cc>
    
    <cc>mike</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>166793</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2017-10-31 05:58:48 +0300</bug_when>
    <thetext>$ rpmquery -a &apos;fonts*&apos;
fonts-type1-urw-1.0.7pre44-alt2.noarch

$ cat sample.dot
digraph {
node [fontname=&quot;Helvetica&quot;, shape=record];
123456;
123456123456;
}

$ uname -m &amp;&amp; dot sample.dot -Tsvg -o sample.svg -Tpng -o sample.png &amp;&amp; grep width sample.svg &amp;&amp; file sample.png
x86_64
svg width=&quot;196pt&quot; height=&quot;45pt&quot;
sample.png: PNG image, 261 x 60, 8-bit/color RGBA, non-interlaced

$ uname -m &amp;&amp; dot sample.dot -Tsvg -o sample.svg -Tpng -o sample.png &amp;&amp; grep width sample.svg &amp;&amp; file sample.png
i686
&lt;svg width=&quot;194pt&quot; height=&quot;45pt&quot;
sample.png: PNG image, 259 x 60, 8-bit/color RGB, non-interlaced

This is reproducible with other providers of Helvetica, too.

Changing font affects the result but does not help much: output png files differ even in trivial cases with fontname=&quot;fixed&quot;:

$ cat sample.dot
digraph {
node [fontname=&quot;fixed&quot;, shape=record];
x;
}

$ uname -m &amp;&amp; dot sample.dot -Tpng -osample.png &amp;&amp; md5sum sample.png
x86_64
852b97d8f3bbc4c32d16346d28d78756  sample.png

$ uname -m &amp;&amp; dot sample.dot -Tpng -osample.png &amp;&amp; md5sum sample.png
i686
4774635c50485fb46365830cfaac642b  sample.png</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166896</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2017-11-02 22:54:17 +0300</bug_when>
    <thetext>А где патч? :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>167510</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2017-11-27 22:31:39 +0300</bug_when>
    <thetext>(In reply to comment #0)
&gt; Changing font affects the result but does not help much: output png files
&gt; differ even in trivial cases with fontname=&quot;fixed&quot;:
&gt; 
&gt; $ cat sample.dot
&gt; digraph {
&gt; node [fontname=&quot;fixed&quot;, shape=record];
&gt; x;
&gt; }
&gt; 
&gt; $ uname -m &amp;&amp; dot sample.dot -Tpng -osample.png &amp;&amp; md5sum sample.png
&gt; x86_64
&gt; 852b97d8f3bbc4c32d16346d28d78756  sample.png
&gt; 
&gt; $ uname -m &amp;&amp; dot sample.dot -Tpng -osample.png &amp;&amp; md5sum sample.png
&gt; i686
&gt; 4774635c50485fb46365830cfaac642b  sample.png

If the only font package installed in the system is fonts-bitmap-misc, the difference in this trivial case disappears:

$ dot sample.dot -Tpng -osample.png &amp;&amp; md5sum sample.png
fb323c3f6b7be80fb73865fbdfdc1489  sample.png

jftr,
$ strace -qqk -e/open -P/usr/share/fonts/bitmap/misc/9x18-ISO8859-1.pcf.gz \
dot sample.dot -Tpng -osample.png
open(&quot;/usr/share/fonts/bitmap/misc/9x18-ISO8859-1.pcf.gz&quot;, O_RDONLY) = 4
 &gt; /lib64/libc-2.25.so(__open64+0x10) [0xde340]
 &gt; /usr/lib64/libfreetype.so.6.14.0() [0x10aaf]
 &gt; /usr/lib64/libfreetype.so.6.14.0(FT_New_Library+0x2cc) [0x15e7c]
 &gt; /usr/lib64/libfreetype.so.6.14.0(FT_Done_Face+0x14e) [0x18eee]
 &gt; /usr/lib64/libfreetype.so.6.14.0(FT_New_Face+0x2c) [0x1978c]
 &gt; /usr/lib64/libcairo.so.2.11400.10(cairo_script_from_recording_surface+0x2b9) [0xc21c9]
 &gt; /usr/lib64/libcairo.so.2.11400.10(cairo_script_from_recording_surface+0x3ca2) [0xc5bb2]
 &gt; /usr/lib64/libcairo.so.2.11400.10(cairo_scaled_font_create+0x274) [0x66334]
 &gt; /usr/lib64/libpangocairo-1.0.so.0.4000.14(pango_cairo_font_get_type+0xfd) [0x5b4d]
 &gt; /usr/lib64/libpangocairo-1.0.so.0.4000.14(pango_cairo_error_underline_path+0x15d) [0x958d]
 &gt; /usr/lib64/libpangoft2-1.0.so.0.4000.14(pango_fc_decoder_get_glyph+0x2f1) [0xcf91]
 &gt; /usr/lib64/libpango-1.0.so.0.4000.14(pango_shape_full+0xb8) [0x2f678]
 &gt; /usr/lib64/libpango-1.0.so.0.4000.14(pango_script_get_sample_language+0x7d7) [0x21a37]
 &gt; /usr/lib64/libpango-1.0.so.0.4000.14(pango_layout_line_unref+0x522) [0x23122]
 &gt; /usr/lib64/libpango-1.0.so.0.4000.14(pango_layout_line_get_extents+0x9e8) [0x25538]
 &gt; /usr/lib64/libpango-1.0.so.0.4000.14(pango_layout_move_cursor_visually+0x6ba) [0x271ea]
 &gt; /usr/lib64/graphviz/libgvplugin_pango.so.6.0.0(get_font_list+0x45a) [0x693a]
 &gt; /usr/lib64/libgvc.so.6.0.0(textspan_size+0x49) [0x378d9]
 &gt; /usr/lib64/libgvc.so.6.0.0(elapsed_sec+0x1cf) [0x4a5ff]
 &gt; /usr/lib64/libgvc.so.6.0.0(make_simple_label+0xbc) [0x4afec]
 &gt; /usr/lib64/libgvc.so.6.0.0(make_label+0xe8) [0x4b1b8]
 &gt; /usr/lib64/libgvc.so.6.0.0(rank+0xc71) [0x4ef61]
 &gt; /usr/lib64/libgvc.so.6.0.0(rank+0x1206) [0x4f4f6]
 &gt; /usr/lib64/graphviz/libgvplugin_dot_layout.so.6.0.0(dot_init_node_edge+0x4d) [0xbb8d]
 &gt; /usr/lib64/graphviz/libgvplugin_dot_layout.so.6.0.0(dot_init_node_edge+0x362) [0xbea2]
 &gt; /usr/lib64/graphviz/libgvplugin_dot_layout.so.6.0.0(dot_layout+0x427) [0xc697]
 &gt; /usr/lib64/libgvc.so.6.0.0(gvLayoutJobs+0xdb) [0x2324b]
 &gt; /usr/bin/dot(_init+0x439) [0xf11]
 &gt; /lib64/libc-2.25.so(__libc_start_main+0xf1) [0x20691]
 &gt; /usr/bin/dot(_init+0x4e2) [0xfba]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171815</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2018-06-11 00:13:50 +0300</bug_when>
    <thetext>Поскольку это будет одна из болячек для p9, поставлю-ка блокер.

2 lav: в сизиф отправлена сборка 2.40.1-alt2 без -ffast-math; спасибо.
2 ldv: проверь, как будет удобно, я уж засыпаю...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171835</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2018-06-12 22:00:47 +0300</bug_when>
    <thetext>На тривиальных примерах, которые я здесь приводил, разницы больше нет.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171836</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2018-06-12 22:37:06 +0300</bug_when>
    <thetext>Спасибо; тогда считаю вопрос закрытым.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>