On 07.01.2011 10:24, Manolo Gouy wrote:
>
> [STR Closed w/Resolution]
>
> Link: http://www.fltk.org/str.php?L2505
> Version: 1.3.0
> Fix Version: 1.3.0 (r8208)
>
>
> Fixed in Subversion repository.
Not yet... ;-)
We both missed an _important_ point. Currently we're converting
the string almost always twice! That's what we wanted to avoid by
pre-allocating and keeping the buffer around, didn't we?
See my commit in r 8211.
BTW.: I tested the mechanism by using a few printf's, and it looks
like the buffer gets allocated with only a few hundred characters,
if at all (normal widgets like in [test/] hello.cxx, valuators.cxx,
and tabs.cxx use slightly more than 100. The longest I found is
test/editor that allocates a buffer for the longest line that is
displayed (even if it is clipped), but I think that doesn't matter
at all.
> Thanks Albrecht for this lesson of Cygwin that's was very useful
> for me.
You're welcome. Thanks for your continuing work on really difficult
internal issues (OS X, X11, Windows GDI). That's amazing!
> Could Xft be processed under Cygwin as it is under X11 ?
generally, yes, I think so, but wait a moment...
> That is, if one does, in fl_utf.c:
> unsigned fl_utf8towc(const char* src, unsigned srclen,
> wchar_t* dst, unsigned dstlen)
> {
> #if defined(WIN32)&& !defined(__CYGWIN__)
> return fl_utf8toUtf16(src, srclen, (unsigned short*)dst, dstlen);
> #else
> ...
> #endif
> }
>
> and removes the cygwin-special cases in Fl_Xlib_Graphics_Driver::draw
> and utf8extents() of fl_font_xft.cxx,
> would that run OK on cygwin ?
I'll take a look at this (and maybe test on Cygwin whatever I find)
and let you know...
Albrecht
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs