From: Luca Padovani (lpadovan@cs.unibo.it)
Date: Wed Jul 09 2003 - 15:00:31 EDT
Hi Martin,
On Wed, 2003-07-09 at 11:20, Martin Sevior wrote:
> ggv is a good example to work from. eog is another good example. I can
> tell you where to look in the abiword source tree for how we it in
> AbiWord.
yes, that would be very useful. So you're implicitly saying that AbiWord
can act as both a container and containee (w.r.t. bonobo architecture).
> You will need to move to gtk2 for a start. I think it would also be a
> good idea to move to using fontconfig to find fonts and xft2 to draw on
> screen.
Well, it hasn't been released yet, but there already is a port of
gtkmathview to GTK2. To be honest, the port is partial. My first plan
was to switch to pango rendering completely, but math fonts have their
own encoding and glyphs, so that a custom mapping Unicode->glyph index
has to be implemented anyway. Right now the GTK2 port still uses some
deprecated APIs to render glyphs on the drawing area. What you're saying
here is that I should implement a rendering system based on Xft2
directly, which should be more or less trivial as you pointed out. At
the same time, I'm not sure how fontconfig can be of any help...
> The issues with using bonobo to render into abiword however are a lot
> more complex than simply drawing into a rectangular area in gtk widget.
> (Which is what AbiWord-2.0 and ggv do)
I agree
> Thinking about this some more, it occurred to me that we would
> probabally like much closer integration of GTKMathView with abiword than
> just using it as a bonobo component.
this is certainly the long-term goal. I wonder if you ruled out the
possibility of using a rich, math-dedicated bonobo interface for this
just because of performance reasons or if there's some other issue
behind. I've noticed that both ggv and eog implement their own
specialized interface. Math is rather more complicated than a
rectangular image, but finding a good common communication protocol for
formatting components is also a very interesting subject by itself.
> Then we could use AbiWord's own layout engine to tell where to split
> equations over multiple lines and line-up equations above equal signs
> etc.
breaking math formulae is a very delicate task. In an early version of
gtkmathview there was support for automatic line-breaking of formulae,
but it turned out to be not really effective and too naive. As breaking
a formula implies knowing at least some of its semantics, I think that
the responsibility for finding breakpoints should be within gtkmathview,
given the space constraints that are communicated from AbiWord.
> might also be a good way to get something quickly running in AbiWord
> before we've worked out how to do solve the integration issues.
this is exactly my plan.
> OK, well as I said I'm very happy to help and the first step is
> definately a port to gtk-2.
I'll try to write an Xft2 backend for gtkmathview if this is what we
need to start. In the meantime, my student is investigating the bonobo
architecture.
Hope to see some running code very soon.
Cheers,
-- luca
This archive was generated by hypermail 2.1.4 : Wed Jul 09 2003 - 15:11:41 EDT