nanogui: Kaffe port issues


Previous by date: 14 Jul 2000 14:58:44 -0000 montavista viewml, Rahul Dave
Next by date: 14 Jul 2000 14:58:44 -0000 [Nano-X] FLTK 1.0.9 port, Murphy C. Chen
Previous in thread:
Next in thread: 14 Jul 2000 14:58:44 -0000 Re: Kaffe port issues, Greg Haerr

Subject: Kaffe port issues
From: "Roman Guseynov" ####@####.####
Date: 14 Jul 2000 14:58:44 -0000
Message-Id: <OF58216716.7574960F-ON4225691B.0032F49B@cms.vinnica.ua>

Hi Greg,
     I've compiled Microwin-88pre11 and really happy about changes you've
made! Thanx for good work.

I have just another set of issues to discuss.

1. Function GetTextExtentExPoint() is extremely needed to make fonts (TTFs)
rendering. I've implemented some substitutions for now but they are too
"straightforward" and diffuse coded. So I think there must be a real
implementation and it should be fundamentally reworked. Is this function
implementation expexcted in 88 release?

2. To make Kaffe rendering gifs and jpegs with transparency there should be
BitBlt() with SRCAND, SRCINVERT ROPs support. Again, I've hacked it out and
it working for 16bpp (fblin16.c) and X11 screen only (scr_x11.c). Also,
PatBlt() (at least with BLACKNESS) needed. I've inserted its implementation
it BitBlt() temporarily. But it is not correct and should be reworked. Does
it expected to be these funcs in 88 release? The same is about StretchBlt()
but I have no any versions of it now so it should be done from scratch.

3. Kaffe does not draw filled rects properly without this checking inserted
at the beginning of GdFillRect() function:
     if ((width<=0)||(height<=0)) return;

4. Is it difficult to support antialiased TTFs in MWin's Win32 API? I've
added such a support but I think it will not work in any circumstances. Or
it will be supported in new release? Maybe it will be good to turn on
antialiasing only when font's requested size is greater than defined value.

5. "Bold" and "Italic" styles for TTFs are also extremely desirable. I've
implemented them in CreateFontIndirect() by just selecting another font
file. I hope you'll include styles support in release.

6. There are some problems with TTF fonts aligning in MWin. I've made some
changes and it works now for Kaffe but I don't sure about it is right in
general:

devfont.c: GdConvertEncoding():

     /* ORIGINAL BEGIN
               cc = utf8_to_utf16((unsigned char *)istr, cc,
                    oflags==MWTF_UC16? ostr: buf16);
     ORIGINAL END */
     // UNDER_KAFFE BEGIN
               cc = utf8_to_utf16((unsigned char *)istr, cc,
                    oflags==MWTF_UC16?(unsigned short*) ostr: buf16);
     // UNDER_KAFFE END

devfont.c: GdGetTextSize():

     /* ORIGINAl BEGIN
          unsigned long  buf[256];
     ORIGINAl END */
     // UNDER_KAFFE BEGIN
          unsigned short buf[256];
     // UNDER_KAFFE END

devfont.c: freetype_gettextsize():

     /* ORIGINAL BEGIN
               if (TT_Load_Glyph (pf->instance, pf->glyph, curchar,
                    TTLOAD_DEFAULT) != TT_Err_Ok)
                         continue;
     ORIGINAL END */
     // UNDER_KAFFE BEGIN
               if (TT_Load_Glyph (pf->instance, pf->glyph, curchar,
                    TTLOAD_SCALE_GLYPH|TTLOAD_HINT_GLYPH) != TT_Err_Ok)
                         continue;
     // UNDER_KAFFE END

winfont.c: GetTextMetrics():

          /* FIXME many items are guessed for the time being*/
          lptm->tmHeight = fi.height;
     /* ORIGINAL BEGIN
          lptm->tmAscent = fi.height - fi.baseline;
          lptm->tmDescent= fi.baseline;
     ORIGINAL END */
     /* UNDER_KAFFE BEGIN */
          lptm->tmDescent = fi.height - fi.baseline;
          lptm->tmAscent= fi.baseline;
     /* UNDER_KAFFE END */

wingdi.c: MwExtTextOut():

          /* this whole text alignment thing needs rewriting*/
          if((hdc->textalign & TA_BASELINE) == TA_BASELINE) {
     /* ORIGINAL BEGIN
               // this is not right...
               flags |= MWTF_TOP;
     ORIGINAL END */
     // UNDER_KAFFE BEGIN
               flags |= MWTF_BASELINE;
     // UNDER_KAFFE END

7. Another problem I found is about white text rendering. I cannot force
MWin to render white text i.e. when I try SetTextColor(hdc,
RGB(255,255,255)) and then TextOut(hdc,...) it is not text rendering at
all! Howewer RGB(255,250,255) works perfectly. I have no ideas why it is so
and how to solve it now. Any suggestions?

Thanx for assistance,

Regards,
- Roman


Previous by date: 14 Jul 2000 14:58:44 -0000 montavista viewml, Rahul Dave
Next by date: 14 Jul 2000 14:58:44 -0000 [Nano-X] FLTK 1.0.9 port, Murphy C. Chen
Previous in thread:
Next in thread: 14 Jul 2000 14:58:44 -0000 Re: Kaffe port issues, Greg Haerr


Powered by ezmlm-browse 0.20.