octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52193] Font choices are ignored when printing


From: Etienne Dechamps
Subject: [Octave-bug-tracker] [bug #52193] Font choices are ignored when printing to an image file
Date: Sun, 8 Oct 2017 10:05:37 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0

URL:
  <http://savannah.gnu.org/bugs/?52193>

                 Summary: Font choices are ignored when printing to an image
file
                 Project: GNU Octave
            Submitted by: edechamps
            Submitted on: Sun 08 Oct 2017 04:05:35 PM CEST
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

(Debian Sid, octave 4.2.1-4+b1)

With the 'gnuplot' graphics toolkit, one can choose the font to be used for
print() by writing something like the following:


set(gcf(), 'defaultaxesfontname', 'DejaVuSansMono');
set(gcf(), 'defaulttextfontname', 'DejaVuSansMono');


Or, alternatively:


print('image.png', '-dpng', '-FDejaVuSansMono');


In both cases, the image will be generated using the specified font.

When using the 'fltk' or 'qt' toolkits however, changing the font using set()
works for window output, but not for print(), where the default font is always
used. That's true at least for PNG and SVG.

In the SVG case it appears the "Helvetica" font is hardcoded in the XML that's
being generated. One hacky workaround is to run this command on the SVG file
after Octave is done generating it:


$ sed -i 's/font-family="Helvetica"/font-family="DejaVuSansMono"/g' image.svg


Obviously that won't work for PNG or any other raster image type, though.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52193>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]