Re: Pango?

From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Wed Apr 24 2002 - 21:59:56 EDT

  • Next message: CHRISTOPHE CARON: "Fwd(2): abiword spelling problem"

     --- Martin Sevior
    <msevior@mccubbin.ph.unimelb.edu.au> wrote: >
    >
    > > > > This means Xft on X too, right?
    > > >
    > > > No, FreeType is independent of any system font
    > > > mechanism; it
    > > > parses the font files and gives you the glyphs
    > as
    > > > bitmaps.
    > >
    > > If we want to support antialiased fonts, where
    > will
    > > that support come from on Linux/Unix?
    >
    > gtk 2.0 does this for us automatically.

    I thought we rendered the document window directly.
    Wouldn't gtk 2.0 antialias the GUI but not the main
    window?

    > Pango
    > > > is a fairly high
    > > > level formatter, it does something like our
    > > > fl_BlockLayout class,
    > > > and we would have to replace the blockLayout
    > with it
    > >
    > > We can't do that. Are you sure Pango doesn't
    > support
    > > multiple levels? I'm pretty sure Uniscribe does
    > and
    > > I hear Pango is quite analagous to Uniscribe.
    >
    > I believe that pango will break a text run to fit in
    > a horizontal container.

    I don't understand what you mean. Break?

    > It seems to me we want pango to do 4 things.
    >
    > 1. Draw a run at a certain location of a graphics
    > class.
    > 2. Measure the width of a run (string of text).
    > 3. Measure the height of a run.
    > 4. If needed tell us is a string of text can be
    > broken at a certain point.

    It would also be nice if Pango could draw the selected
    versus non-selected parts of the text, including
    combining characters, in different foreground and
    background colours. If it couldn't we'd also need a
    way to get widths of substrings so we could do it our
    selves.

    > Is this possible?
    >
    > MAybe we should look at replace parts of
    > fb_LineBreaker with calls to
    > pango? This would interfere with my grand plans for
    > a new layout engine.

    Line breaking is difficult. We need to do it
    properly one way or another. I've mentioned using
    ICU before - it's open sourced by IBM. What's
    peoples'
    opinions on this?

    > > > _to_get_most_out_of_it_. This basically means
    > > > throwing our entire
    > > > existing layout engine out and start again. It
    > could
    > > > well be the best
    > > > thing to do right now, but I am not fully
    > convinced.
    > >
    > > I don't believe Pango can do the layout stuff we
    > need
    > > to do but I'm in favour of throwing out our entire
    > > existing layout engine if that's the way to get
    > > the best product.
    >
    > OK I'll try to find time to thoruoghly investigate
    > the pango api. I was
    > hoping to leave to you guys!

    I really wish I could do it ):

    > My *feeling* is that we can use bits to replace
    > methods in our current
    > layout and graphics classes.

    We should at least try. At least in an experimental
    branch or something.

    > > > > Surely we would use Pango only for rendering
    > the
    > > > > straight "runs" of text. All formatting
    > including
    > > > > tabs we would do ourselves.
    > > > If that is all we want to use Pango for, then we
    > > > have to migrate to
    > > > freetype first, because we will be left to do
    > > > the screen drawing using glyph indices, and we
    > > > do not want to do this
    > >
    > > Surely we would do this with Pango too?
    >
    > I agree.
    >
    > > > writing a fairly large amount of code."
    > >
    > > We shouldn't be scared of that. It sounds like a
    > > good thing. And doing it without Pango would
    > involve
    > > a much larger amount of code IMHO.
    > >
    >
    > I agree.
    >
    > > > > Surely if pango can give us a shape
    > > > > to print on the screen it can give us one to
    > > > > print on
    > > > > a printer - but I don't know printers alas...
    > > > Pango, if used in the way you envisage, only
    > > > gives us a glyph
    > > > indices, but even if it gave us actual shapes,
    > > > this would be of no
    > > > use for generating PostScrip. In the Unix World
    > > > the fact we can
    > > > draw it on screen does not mean we can print it
    > > > via PostScript,
    > > > because we could well be using non-PostScript
    > > > fonts on the
    > > > screen. Again, I am not saying there is a
    > > > problem, merely that this
    > > > issue has to be looked into, for being able to
    > > > support a myriad of
    > > > languages on screen is not enough in itself.
    > >
    > > Since the new Gnome has Pango built in and used
    > > everywhere, how does gnomeprint cope in the new
    > > Gnome?
    >
    > I agree again. I don't know if printing has been
    > thought all the way
    > through. Someone remarked that pango next generation
    > would have a printing
    > component.

    Even without pango aren't we going to have the exact
    same problems between various font formats, the
    screen, and the printer? Shouldn't we even have such
    problems now? Do we have them now? How do we handle
    this now? Do we convert all glyphs to postscript and
    if so, why can't we just keep doing this?

    > > > us, and *WHO WILL DO THE CODING*. The bidi
    > > > experience taught me that not that many
    > > > people will do the coding when it comes to
    > > > more "exotic" internationalization.
    > >
    > > I've always been very keen to work on it. I just
    > > happened to be on a world trip during most of the
    > > work you did. Now I just need an income or at
    > > least a computer and internet access and I'm
    > > itching to tackle it!

    > This is great! I'm willing to live with fixing
    > assumptions about one docposition one character one
    > letter if you guys promise to follow through on full
    > international support. Otherwise we might as well
    > stick to our current internationalization.

    Full internationalization is the #1 reason I started
    to hack AbiWord.

    Andrew Dunbar.

    > > Trying to get better rendering and
    > > internationalization
    > > will require just that no matter whether we use
    > > Pango or not. But we should keep talking so
    > > everybody knows how much of a commitment it would
    > > mean. Maybe at the end of the day they will
    > > decide it's too ambitious and just do the tables
    > > etc for 1.2 and leave this till later. At least
    > > they will make that decision with the best
    > > information available.
    >
    > I'm beginning to understand that. I'm very happy you
    > guys are talking about that.
    >
    > Cheers
    >
    > MArtin

    =====
    http://linguaphile.sourceforge.net http://www.abisource.com

    __________________________________________________
    Do You Yahoo!?
    Everything you'll ever need on one web page
    from News and Sport to Email and Music Charts
    http://uk.my.yahoo.com



    This archive was generated by hypermail 2.1.4 : Wed Apr 24 2002 - 22:01:24 EDT