Re: Pango without FreeType (or fontconfig)



On 14-09-03 02:57 PM, Lóránt Pintér wrote:
Hey, thanks for replying. Comments inline.

On Wednesday, Sep 3, 2014 at 12:58 pm, Behdad Esfahbod <
behdad behdad org <mailto:behdad behdad org>
, wrote:

    So, you are OK with the glib dependency?

I’m not sure what the glib dependency means for us. Can you explain why it
would be a problem?

It's just one more library you need to cross-compile.  And glib comes with
lots of things that Pango doesn't need and I suppose you wouldn't need, so
there's some work trimming it down there.

Does emscripten or the rest of your toolchain already know how to remove
unused library code?


    Current versions of pango use a convoluted module system to choose shapers. I
    have a branch that removes most of that:

    https://github.com/behdad/pango/tree/kill-modules

Cool. Is there a plan to merge this into the main line?

Yes.  It's very close to being mergable.  I just need to do the same (ie
hardcode) language modules the same way I did for shaper modules.  I'm away
for vacation and conferences for multiple weeks though, but expect this to
definitely land later this year.


    After that, you need to implement a set of PangoFontMap / PangoFontFamily /
    PangoFontFace / PangoFont subclasses since you don't want to use PangoFc.
    This is rather straightforward, if you don't want much font fallback.

Sounds workable. We already have similar classes in our own implementation
that I want to replace with Pango.

    For the shaper part, modify pangofc-shape.c. You just need access to the
    hb_face and you can do the rest from there.

I’m looking for a solution where (eventually) I won't need to keep a separate
branch of Pango. Would it be possible to do this without modifying existing code?

You don't need to modify anything.  libpangofc itself uses libpango's public
API only.  You will be doing the same.  Right now that involves copying
pangofc-shape.c and modifying it.  Some time in the future I'll hardcode
HarfBuzz as the only shaper Pango supports, and at that time the logic in
pangofc-shape.c will be shared across all backends and you can remove your copy.


Thanks,
Lorant

Let me know if you have any other questions.  I'm really curious to see this
in action.

-- 
behdad
http://behdad.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]