[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about contibuting to octave
From: |
Shai Ayal |
Subject: |
Re: about contibuting to octave |
Date: |
Tue, 3 Mar 2009 20:51:01 +0200 |
On Tue, Mar 3, 2009 at 10:36 AM, Michael Goffioul
<address@hidden> wrote:
> On Tue, Mar 3, 2009 at 8:18 AM, Ben Abbott <address@hidden> wrote:
>> The fltk backend is primarily in src/fltk_backend.cc
>>
>> The gnuplot backend is primarily written as m-files. They are in
>> scripts/plot (there is a lot of other files having nothing to do with
>> gnuplot, in particular, there as well).
>>
>> Regarding the text object's "extent"s, I've been under the assumption that
>> this could/would be handled independent of the backend, and that all
>> backends would rely upon a unified solution for calculating the extents of a
>> text object.
>>
>> Am I off in my expectation? ... if so, if anyone has a thought on how the
>> extents for the gnuplot backend might be determined, please advise.
>
> Basically, the only thing you need is font metrics information. From that,
> you should be able to compute text extent in an independent way. Even a
> simple TeX text layouter could be written independently. Font metrics
> information is also required to correctly layout axes (title, labels,
> ticks...).
> Once you have that information, the rest is (should be) backend-agnostic.
>
> The OpenGL renderer already uses FTGL, which depends on freetype, so
> the most natural choice would be to use freetype to get font metrics.
> If freetype is not available (but honestly, are there systems supported by
> octave that do not have freetype...?), we might use a very basic font
> metrics computation based on the font height: it'll be wrong for non-standard
> fonts, but you need a backup solution.
>
I think this is a good idea -- this will decouple the text object from
the backend.
We will need to know what fonts gnuplot uses to get freetype to get us
gnuplot's font metrics?
I think we can get the standard postscript font metrics from similar
type1 fonts which freetype can use (I distributed a set of ps-similar
fonts with octplot)
Shai
- about contibuting to octave, xianghang liu, 2009/03/02
- Re: about contibuting to octave, Shai Ayal, 2009/03/02
- Re: about contibuting to octave, Ben Abbott, 2009/03/03
- Message not available
- Re: about contibuting to octave, Shai Ayal, 2009/03/03
- Re: about contibuting to octave, Ben Abbott, 2009/03/03
- Re: about contibuting to octave, xianghang liu, 2009/03/03
- Re: about contibuting to octave, Ben Abbott, 2009/03/03
- Re: about contibuting to octave, Michael Goffioul, 2009/03/03
- Re: about contibuting to octave,
Shai Ayal <=
- Re: about contibuting to octave, Michael Goffioul, 2009/03/03
- Re: about contibuting to octave, Ben Abbott, 2009/03/03
- Re: about contibuting to octave, xianghang liu, 2009/03/04
- Re: about contibuting to octave, Shai Ayal, 2009/03/04
- Re: about contibuting to octave, xianghang liu, 2009/03/04
- Re: about contibuting to octave, Shai Ayal, 2009/03/04
- Re: about contibuting to octave, Michael Goffioul, 2009/03/04
- Re: about contibuting to octave, Ben Abbott, 2009/03/04
- Re: about contibuting to octave, xianghang liu, 2009/03/05
- Re: about contibuting to octave, Shai Ayal, 2009/03/05