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

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

[Octave-bug-tracker] [bug #45600] fonts displayed too small in gl-based


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #45600] fonts displayed too small in gl-based plots
Date: Fri, 28 Aug 2015 15:26:16 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

Follow-up Comment #8, bug #45600 (project octave):

Once again I have spoken too soon.
I recently tried to understand our freetype text rendering engine in order to
solve bug #45508 and this one. The freetype renderer uses pixels as base units
whereas we feed it with font sizes in pixels. The major consequence is that
the on-screen size of text objects is screen resolution dependent : a large
screen resolution necessarily leads to ridiculously small fonts. This is
easily fixed by converting points to pixels but ... this degrades the printed
outputs: fonts are too small as compared to e.g legend box.

* What is that trick?

See the excerpt of print.m below


## print() requires figure units to be "pixels"
...
set (opts.figure, "units", "pixels");

## graphics toolkit translates figure position to eps bbox (points)
...
fpos(3:4) = opts.canvas_size;
set (opts.figure, "position", fpos);


We resize the figure windows prior to printing, so far so good, this is
necessary to get all objects right in the desired aspect ratio. But we use a
size computed in *points* units to change the position property of a figure
which is supposed to be expressed in *pixel* units.

I am under the impression that gl2ps interprets the pixels coordinates from
the opengl viewport/feedback buffer as points. So in order to  obtain an
output image that has the expected dimensions the above trick is necessary.

My conclusion is that this bug can be solved only if we find a way to instruct
gl2ps how to convert pixels (hardware dependent) to points (hardware
independent). 
I posted a message on gl2ps mailing list and will report back here.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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