Re: further notes on using Pango

From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Thu Apr 25 2002 - 14:13:16 EDT

  • Next message: Leonard Rosenthol: "Re: further notes on using Pango"

    Hi Leonard,

    > >(5) Develop a new XP font manager (some, but not much platform
    > >code needed), no complexities here, all we need to is to be able to
    > >retrieve font names and associate them with their Pango descriptions
    > >(not unlike the Unix font manager), probably from a pregenerated text
    > >file.
    > Why doesn't FT fit the bill here - or is there something that
    > I am not understanding about what you mean by a "Font
    > Manager"?

    We need some internal mechanism for filling the font combo box
    with user readable names, and associating the font names in the
    combo box with a the descriptive data with the PangoFont objects;
    this should be straight forward. Pango itself takes care of the 'real'
    font management, it has a manager based on the xft library that
    maintains a database of fonts available through FT and also has a
    mechanism for automatic font substitution when the requested font
    is not available.

    It seems we would not need to directly interact with FreeType, the
    Pango low-level api makes it possible to take a string and get back
    a finished FT_Bitmap, which is better than I first thought, all we
    would need is for each platform to implement a function for drawing
    this bitmap on screen, everything else can be XP. PS output would
    be a bit more complicated, but at the same time, this would be an
    excellent oportunity to move it into the XP land.

    > >(6) replace the current shaping engine with Pango.
    > You tell us - that's your baby ;).
    I do not see this as a major problem, this is one thing that I am
    prepared to do the necessary work on -- as long as we can deal
    with the portability issues, we are in business. I have spent a better
    part of the day examining the low level API of Pango, and it does
    seems to provide all we need, and I think the changes would be
    transparent to all our layout classes above fp_TextRun (I can hear
    Martin sighing with relief :-)).

    > >(7) get the existing Pango language modules other than Hebrew
    > >and Arabic to work with the FreeType back end. I have no idea how
    > >much work this would be, but without it we would have only support
    > >for Hebrew and Arabic, albeit much better than we have now.
    >
    > Not a clue here. How many modules? What's involved?

    For each language Pango handles there is a module, at the
    moment there are modules for Hebrew, Arabic, Hangul, Indic, Tamil
    and Thai, plus a basic module that handles everything unhandled.
    Unfortunately, but logically, each of these modules requires a
    separate implementation of interface with each supported font
    backend. At the moment, the only modules which have the ft2
    implementation are Hebrew and Arabic. I have no idea how much
    work it would be to add this to the other modules, but suspect it
    would require familiarity with Pango, FreeType and the language in
    question. (I only had a closer look at the Hebrew module, and that
    looks good, Dov Grobgeld done some work on proper positioning of
    vowels, accents, etc.).

    Tomas



    This archive was generated by hypermail 2.1.4 : Thu Apr 25 2002 - 14:18:31 EDT