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

Re: [putty]Re: PuTTY details



On Thu, 29 Jan 2004, Simon Tatham wrote:

> > On Thu, 29 Jan 2004, Simon Tatham wrote:
> >> More importantly, a DLL solution is tying the functionality to
> >> Windows again - if fribidi is going to be used, then it should be
> >> usable on all platforms.
>
> Behdad Esfahbod <behdad at cs dot toronto dot edu> wrote:
> > FriBidi is designed and work on POSIX systems.  There has been a
> > port for Windows system as I mentioned.  It uses libtool so you
> > can compile it under cygwin, OS X, BSD, Solaris, Linux, ...
>
> ... PalmOS, EPOC, Windows CE? People already have PuTTY ports for
> some of these platforms to some extent.

FriBidi is also used for Hebrew support under Nokia mobile phones
too :).

> I'm not sure I understand why an implementation of the Unicode bidi
> algorithm should depend on POSIX functionality at all. Surely it's a
> self-contained computational task which ought to be possible in pure
> ANSI C, using nothing even slightly OS-dependent?

That's exactly the case.  When I said POSIX and etc, I was
refering to the build structure and etc, otherwise it does not
even use stdio.

> I'm afraid I can't help wondering if a better solution would be to
> have a custom-written bidi implementation for PuTTY. One reason why
> I wonder this is that I've just looked at the fribidi sources. It
> seems to me that a significant proportion of the code in there is
> not useful in PuTTY: there's a lot of stuff implementing character
> sets, for example, which is pointless since everything in PuTTY's
> terminal data is already in Unicode. And we already have a wcwidth
> implementation and don't need another one.

The main part of fribidi is the file fribidi.c which implements
the algorithm itself and has proved to be stable and bug-free
now.  If you were to include FriBidi in PuTTY, you could trim
down everything you don't need.  That's what Pango does.  But if
you are going to optionally require it, it doesn't really matter
what bells and whistles it has anymore.

> If I were doing this myself, I strongly suspect I would write my own
> bidi implementation, designed from scratch to be small, totally
> portable, and self-contained. This way we would avoid any licensing
> dangers, preserve full portability across any platform anyone ever
> plans to run PuTTY on, and avoid wasting space.

You can always do this.  But then you are simply adding one more
place that I need to go fix Arabic Shaping bugs.  Currently there
are Pango, QT, OO.o, AbiWord, and Mozilla that times to times I
have to fix their bugs.  FriBidi in a month or two would have
Arabic Shaping support, and most of those crap about character
sets moved outside.  It's up to you.

> Cheers,
> Simon


behdad