Re: Pango: moving forward

From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Sun Apr 28 2002 - 22:59:44 EDT

  • Next message: Andrew Dunbar: "Re: widht vs. width in layout units"

     --- Tomas Frydrych <tomas@frydrych.uklinux.net>
    wrote: >
    > > Another issue that we must also clean up in tandem
    > is our *Unix* font
    > > code with the UnixFontManager class sitting
    > between gdkFonts and
    > > psFonts.
    >
    > Pango has extremely powerful abstract way of
    > handling fonts, so
    > that the UnixFontManager would not be needed at all.
    > Instead we
    > would have a single XP font manager that would
    > provide a
    > convenient interface to Pango. It would hold the
    > list of fonts/faces
    > available through Pango and some basic functions to
    > request a font
    > from Pango, etc., but in essence it would be just a
    > wrapper around
    > various Pango calls.

    I'm in favour of keeping the platform-dependent
    font managers for one cycle just to allow Pango to
    prove itself. They can all just wrap directly an
    XP font manager. I also want this so I can have the
    possibility of playing with a Uniscribe version for
    Win32 since it has more scripts supported than
    pangoft,
    supports bitmap fonts (which pango doesn't and some
    times that's all there is for rare languages), and
    supports printing on Windows.

    > The whole bunch of PS classes would be moved into XP
    > code, and
    > reworked. We would have to create a function that
    > would convert a
    > PangoGlyphString into PS output; this might not be
    > trivial, but the
    > data stored in the PangoGlysphString does, I think,
    > contain
    > everything we need for that. Also, as Leonard
    > mentioned, there are
    > some OS projectes that generate PS using FreeType,
    > so there is a
    > good chance we might be able to borrow at least some
    > code.

    Wouldn't it be better for everyone if the PS work
    went directly into FreeType instead of into AbiWord?

    > The ttftool program we use on Unix would need to be
    > reworked and
    > moved into XP land, and also into AW itself (into
    > some PS class),
    > so that we could generated type 42 fonts from ttf on
    > request when
    > printing. This would make the use of ttf fonts on
    > Unix entirly
    > trasparent to the user; I have also been told that
    > it is possible to
    > generate type 42 fonts from ttf using only a limited
    > set of glyphs
    > from the original font, which would allow us to
    > substantially reduce
    > the size of our PS output.

    Again it sounds like some portion of this should move
    into Pango instead of into AbiWord.

    > > Can we jump straight to using pangofonts
    > everywhere? Is there someone
    > > willing to work on this code?
    > The only thing I am not sure about is the GUI, which
    > will need font
    > representation native to the sytem, but that
    > genrally concerns a
    > single font. But otherwise if we use Pango, we will
    > have to use the
    > PangoFont objects, and I am going to work on that.

    Windows just takes 8-bit encoded strings for the
    GUI though I want to move the Windows build to a
    Unicode build so we can pass UCS-2 strings.

    > > Havoc's posts on fontconfig are very convincing. I
    > think we should
    > > definately leverage this work so installing new
    > fonts for abiword is
    > > as easy as windows.
    > I think, ultimately we do not want to be installing
    > fonts for AbiWord
    > at all, we just want to use fonts on the system.
    > Pango will make
    > that possible for us, because (1) it will filter out
    > unsuitable fonts, (2)
    > it will always find us some substitution for a
    > non-existent font, say
    > if Times New Roman is not found. What I like about
    > the current font
    > mechanims used the Pango FreeType back end, is that
    > we could
    > use it on all our platforms, for each platform would
    > just need a
    > different XftConfig file.

    This is very good. We must keep in mind that we'll
    have to be able to query the fonts for what codepoints
    and/or glyphs they contain so we can support smart/
    dumb quotes, abstract combining vs. fully composed
    characters, and any other glyph remapping issues.
    I doubt Pango already "just works" for complex issues
    like these.

    Andrew Dunbar.

    > Tomas

    =====
    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 : Sun Apr 28 2002 - 23:01:33 EDT