Re: Suggestion on enhance typesetting

From: Tomas Frydrych <tf_at_o-hand.com>
Date: Mon Jul 21 2008 - 03:45:50 CEST

Hi,

Sonam wrote:
> AbiWord's typesetting algorithm for justified blocks works fine for
> latin languages like english, french & etc. But for other languages
> like Chinese/Japanese/Korean and Tibetan, it can NOT generate nicely
> justified right edge, because in these languages, most sentences has
> no spaces at all in a single line, so the current AbiWord's algorithm
> lost shrinking & expanding ability.

This is really an issue in the Pango graphics class; mostly the problem
is that Pango does not make the justification information available to
us -- it would be simple to fix on the AbiWord end if this information
was available (compare the Uniscribe class for Windows).

> I suggest introducing a typesetting scheme like that of
> XeTeX's \XeTeXinterchartoks, by having a config file for each locale,
> to insert glue like typesetting elements automatically. I think the
> fp_TextRun should be enhanced to deal with that.

Nope, this is not the way forward; the justification information is part
of the what a text renderer such a Pango should provide. Perhaps more
significantly, while it might be possible to do this for English or
Chinese without the co-operation of the renderer, in cursive scripts
such as Arabic this can only be done properly by the renderer, because
it requires the insertion of special glyphs rather than expanding
spacing between glyphs. Ideally, we would want a very simple API in
Pango that would allow us to specify to what size a glyph string should
be justified, and the renderer should take care of that for us.

> I've also read that Thai language also needs special processing of line breaking.

AbiWord actually handles that already; unlike the justification
information, the line breaking data is readily available.

Tomas
Received on Mon Jul 21 03:46:10 2008

This archive was generated by hypermail 2.1.8 : Mon Jul 21 2008 - 03:46:10 CEST