[Pkg-octave-devel] Bug#477688: Bug#477688: [octave3.0] print()'ing a figure with title or (x|y)labels fails with gdImageStringFT error

Rafael Laboissiere rafael at debian.org
Fri Apr 25 11:06:48 UTC 2008


package octave3.0
tags 477688 confirmed upstream
thanks

* Didier Raboud <didier at raboud.com> [2008-04-24 17:04]:

> Package: octave3.0
> Version: 1:3.0.1-1
> Severity: normal
> 
> --- Please enter the report below this line. ---
> Hi, 
> 
> If I enter the following in Octave 3.0.1-1 :
> --- Test Case ---
> figure;
> plot(1:2,1:2);
> xlabel('Label X');
> ylabel('Label Y');
> title('Title');
> legend('Blue Line');
> print('/tmp/testcase.png');
> --- /Test Case ---
> 
> After the last command, I get the following error :
> --- Error ----
> gdImageStringFT: Could not find/open font while printing string Label Y with 
> font Helvetica
> gdImageStringFT: Could not find/open font while printing string Label X with 
> font Helvetica
> gdImageStringFT: Could not find/open font while printing string Title with 
> font Helvetica
> --- /Error ---
> 
> And the resulting image contains no title nor labels (but contains the textual 
> legend !)

This problem has been already discussed in the upstream mailing list [1].  I
do not know how to fix it.  For now, you could try the following:

$ sudo apt-get install ttf-bitstream-vera
$ export GDFONTPATH=/usr/share/fonts/truetype/ttf-bitstream-vera
$ octave
octave:1> figure;
octave:2> plot (1:2, 1:2);
octave:3> xlabel ('Label X', 'Fontname', 'Vera');
octave:4> ylabel ('Label Y', 'Fontname', 'Vera');
octave:5> title ('Title', 'Fontname', 'Vera');
octave:6> legend ('Blue Line');
octave:7> print('/tmp/testcase.png');

-- 
Rafael





More information about the Pkg-octave-devel mailing list