[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: |
Wed, 4 Mar 2009 11:49:03 +0200 |
On Wed, Mar 4, 2009 at 11:22 AM, xianghang liu <address@hidden> wrote:
>
>
> On Wed, Mar 4, 2009 at 2:48 PM, Shai Ayal <address@hidden> wrote:
>>
>> 2009/3/4 xianghang liu <address@hidden>:
>> >
>> >
>> > On Wed, Mar 4, 2009 at 10:00 AM, Ben Abbott <address@hidden> wrote:
>> >>
>> >> On Mar 3, 2009, at 2:52 PM, Michael Goffioul wrote:
>> >>
>> >>> On Tue, Mar 3, 2009 at 6:51 PM, Shai Ayal <address@hidden> wrote:
>> >>>>
>> >>>> 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)
>> >>>
>> >>> I guess gnuplot backend would use the back-up implementation.
>> >>> Or we could still use freetype, hoping that gnuplot will use the same
>> >>> metrics...
>> >>>
>> >>> Michael.
>> >>
>> >> Gnuplot uses the GD library.
>> >>
>> >> http://en.wikipedia.org/wiki/GD_Graphics_Library
>> >>
>> >> http://www.libgd.org/Main_Page
>> >>
>> >> After reading some hits via Google, it appears that this library can
>> >> calculate the bounding rectangle text without rendering it, and that
>> >> gdlib
>> >> handles freetype, PS type 1 fonts, and truetype.
>> >>
>> >> http://my.php.net/gd
>> >>
>> >> imageftbbox — Give the bounding box of a text using fonts via
>> >> freetype2
>> >>
>> >> imagepsbbox — Give the bounding box of a text rectangle using
>> >> PostScript Type1 fonts
>> >>
>> >> imagettfbbox — Give the bounding box of a text using TrueType
>> >> fonts
>> >>
>> >> Ben
>> >>
>> >>
>> > So there are already 3 methods to get the extent property without
>> > dependency
>> > on backends:
>>
>> Well none of them are implemented in octave yet ...
>>
>> > use GD library
>> > use freetype
>> > back-up method if these libraries is absent or the font is non-standard
>> >
>>
>> Since it seems that GD uses freetype also, I would go for freetype +
>> very simple backup.
>>
>> Shai
>
> In freetype, I found two functions
>
> FT_Outline_Get_BBox Compute the exact bounding box of an outline.
> FT_Outline_Get_CBox Return an outline's ‘control box’.
>
> After a rough glance at ftgl's bounding box computation, I think it use
> FT_Outline_Get_CBox to compute the box of each glyph and add them together
> to get the extent of the string. Shall we just follow the same method?
>
Sounds good to me
- Re: about contibuting to octave, (continued)
- 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, 2009/03/03
- 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 <=
- 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
- Message not available
- Re: about contibuting to octave, xianghang liu, 2009/03/05
- Re: about contibuting to octave, xianghang liu, 2009/03/11
- Re: about contibuting to octave, Shai Ayal, 2009/03/11
- Re: about contibuting to octave, Søren Hauberg, 2009/03/11
- Re: about contibuting to octave, Shai Ayal, 2009/03/11
- Re: about contibuting to octave, xianghang liu, 2009/03/11