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

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

[Octave-bug-tracker] [bug #59355] Font size scaled when -F and -S option


From: Rik
Subject: [Octave-bug-tracker] [bug #59355] Font size scaled when -F and -S option are used together
Date: Mon, 2 Nov 2020 17:43:39 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36

Update of bug #59355 (project octave):

                 Summary: Incorect font size in printed svg when -S and -F
option are used together => Font  size scaled when -F and -S option are used
together

    _______________________________________________________

Follow-up Comment #5:

I think this may be an issue of interpretation about what is the desired
result.  The code in print.m that handles the -F options is


        if (! isempty (opts.fontsize))
          ## Changing all fontsizes to a fixed value
          if (ischar (opts.fontsize))
            fontsize = str2double (opts.fontsize);
          else
            fontsize = opts.fontsize;
          endif
          if (do_scalefontsize)
            ## This is done to work around the bbox being whole numbers.
            fontsize *= opts.scalefontsize;
          endif


Instead of assigning the fontsize as given by the -F option, it applies a
scaled version so that if you change the sizing with -S option things don't
look weird.

As an example, try


print('fig2.svg','-dsvg',['-S' num2str(pos(3)/4) ','
num2str(pos(4))],'-F:18');


This uses 1/4 of the x-dimension and produces a narrow, but tall, plot which
is attached as fig2.orig.svg.  Note that the plot labels have been scaled so
that the plot still looks reasonable.

I disabled font scaling and then made the same squished plot.  It is attached
as fig2.new.svg.  I prefer the look of existing code.


(file #50197, file #50198)
    _______________________________________________________

Additional Item Attachment:

File name: fig2.orig.svg                  Size:7 KB
    <https://file.savannah.gnu.org/file/fig2.orig.svg?file_id=50197>

File name: fig2.new.svg                   Size:7 KB
    <https://file.savannah.gnu.org/file/fig2.new.svg?file_id=50198>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59355>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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