[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-bidi] using fribidi and Pango
From: |
Omer Zak |
Subject: |
Re: [emacs-bidi] using fribidi and Pango |
Date: |
Mon, 05 Dec 2005 06:53:43 +0200 |
On Sun, 2005-12-04 at 22:06 +0000, Tomas Frydrych wrote:
>
> Behdad Esfahbod wrote:
> > My recent work in Pango made me believe that writing general
> > purpose libraries for algorithms is just not easy to get right.
> > You cannot have an stable general API and high performance
> > together. Algorithms to consume low memory and perform fast,
> > need to integrate into eachother at levels not quite possible by
> > library APIs.
>
> Yes, this is why I have been very resistant to use Pango in the win32
> version of AbiWord -- perhaps Pango should limit itself to being a *nix
> library, but this is probably not of great interest to this list.
>
> > Even an array containing the input text is being
> > problematic. There's always someone asking for UTF-8, one for
> > UTF-16, another for UTF-32. Then there are libraries that keep
> > some kind of struct Char [], that contains more than the text
> > itself. You just cannot write a fast low-overhead library to
> > handle them all. And you cannot use glib, since too many
> > projects don't use it, so you need to define all the UTF-8 and
> > UTF-16 functions yourself, should you go that route. Not talking
> > about how hard just finding a 32-bit integer can be...
>
> Yep, the utf8 api of Pango is such a pain when you work with ucs4 ;)
It may be a good idea to review how C++ implements templates and works
together with the linker (ld in *nix) not to link in functions, which
have been instantiated but are not actually used.
Then have the standard Pango codebase build several variants of the
libraries, each library with different API details.
Details which could be different:
- Data type name of 32-bit integer.
- UTF-8 vs. UCS-32 etc.
- Different ways of integration of the BiDi algorithm with the client
application.
Once this is implemented, we open the way to possibilities of factoring
in the future, so that the final number of variants can be reduced and
each variant of the library be made capable of handling different APIs
in efficient manner.
--- Omer
--
Sent from a PC running a top secret test version of Windows 97.
My own blog is at http://www.livejournal.com/users/tddpirate/
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
- Re: [emacs-bidi] using fribidi and Pango, (continued)
- Re: [emacs-bidi] using fribidi and Pango, Tomas Frydrych, 2005/12/02
- Re: [emacs-bidi] using fribidi and Pango, Eli Zaretskii, 2005/12/02
- Re: [emacs-bidi] using fribidi and Pango, Behdad Esfahbod, 2005/12/02
- Re: [emacs-bidi] using fribidi and Pango, Tomas Frydrych, 2005/12/04
- Re: [emacs-bidi] using fribidi and Pango, Eli Zaretskii, 2005/12/04
- Re: [emacs-bidi] using fribidi and Pango, Martin Duerst, 2005/12/06
- Re: [emacs-bidi] using fribidi and Pango, Eli Zaretskii, 2005/12/06
- Re: [emacs-bidi] using fribidi and Pango, Behdad Esfahbod, 2005/12/06
- Re: [emacs-bidi] using fribidi and Pango, Behdad Esfahbod, 2005/12/04
- Re: [emacs-bidi] using fribidi and Pango, Tomas Frydrych, 2005/12/04
- Re: [emacs-bidi] using fribidi and Pango,
Omer Zak <=
- Re: [emacs-bidi] using fribidi and Pango, Eli Zaretskii, 2005/12/04
- Re: [emacs-bidi] using fribidi and Pango, Behdad Esfahbod, 2005/12/05
- Re: [emacs-bidi] using fribidi and Pango, Tomas Frydrych, 2005/12/05
- Re: [emacs-bidi] using fribidi and Pango, Eli Zaretskii, 2005/12/05