nanogui: Thread: FreeType2 and SetPortrait


[<<] [<] Page 1 of 1 [>] [>>]
Subject: FreeType2 and SetPortrait
From: "Rafael Schwarz" ####@####.####
Date: 21 Oct 2008 14:00:43 -0000
Message-Id: <9ffb746f0810210700r46d93b67meba623cc745fe0e8@mail.gmail.com>

Hi all,

I'm using microwindows version 0.91 with nano-X and freetype2 fonts.
When I run my application with portrait none, it works perfectly. When I try
to run it with the portrait left, nano-X draws everything correctly, even
the images, but the texts don't appear. I tried to debug the nano-X, but I
didn't find where the error happens.
Anyone knows something about it?

Thanks in advance,

Rafael C. Schwarz
Subject: Re: [nanogui] FreeType2 and SetPortrait
From: "Greg Haerr" ####@####.####
Date: 21 Oct 2008 18:08:55 -0000
Message-Id: <205701c933a8$0bb0d3b0$0300a8c0@RDP>

: I'm using microwindows version 0.91 with nano-X and freetype2 fonts.
: When I run my application with portrait none, it works perfectly. When I 
try
: to run it with the portrait left, nano-X draws everything correctly, even
: the images, but the texts don't appear. I tried to debug the nano-X, but I
: didn't find where the error happens.

I'm not looking at the source code now, but the issue has to
do with FT2 using the psd->DrawArea entry point to the
screen driver, and these get replaced with different driver
entry points (allowing translated coordinates) using the
drivers/left_portrait.c and drivers/right_portrait.c source
modules.

Translating x,y values for lines and points is easy, but for
fast blits is harder.  The psd->Blit entry point has a conversion
function, but the psd->DrawArea entry point was contributed
and the work was not finalized.  The blit will need to take place
using fully translated x and y values.  This is where it gets complicated:

My original design always kept images in hardware scan format,
(regardless of portrait orientation) allowing for fast blits
in normal and portrait modes.  Otherwise, any portrait blit
would have to draw pixel-for-pixel translating source
and destination, which would be VERY slow.

Look at the psd->Blit replacement stub in the portrait
modules above.  You'll essentially need to do the same
thing for the psd->DrawArea entry point, and your
text should display.

In a later version of Microwindows, we should combine
the blit and drawarea entry points.  The reason the
drawarea entry point was contributed is that it supports
alpha blending and is faster than my original blit work.
This was because I was trying to keep writing a new
screen driver simple for new systems, which of course
is a simplicity/speed tradeoff.

Hope this makes sense.  BTW, Freetype 1 doesn't
use the drawarea entry point, but instead uses the
older blit draw, so that should work for you if
you can't get the above working.

Regards,

Greg

Subject: Re: [nanogui] FreeType2 and SetPortrait
From: "Rafael Schwarz" ####@####.####
Date: 22 Oct 2008 11:28:29 -0000
Message-Id: <9ffb746f0810220428l7bada953ide6f9073a0988de0@mail.gmail.com>

Thanks Greg,
Now I understand how the draw funtcions work and what was the problem.

and thanks Klatt,
I've compiled your code here, and it worked in the first try.


Rafael C. Schwarz


Now I have the information that I needed.
I will keep trying here,

2008/10/22 Klatt Uwe ####@####.####

> Hello Rafael,
>
> you can try my attached fbportrait_left.c.
> It works for me.
>
> Beste Grüße aus Arnstein | Best Regards from Arnstein, Germany
>
> Dipl.-Ing. Uwe Klatt
> Forschung & Konstruktion Elektronik
>
> Phone +49-(0)9363-688329 | Fax +49-(0)9363-688407 | www.miwe.com
>
> MIWE Michael Wenz GmbH, Michael-Wenz-Straße 2-10, 97450 Arnstein, Germany
> Geschäftsführung | MD: Sabine Michaela Wenz, AG Würzburg HRB 4495
>
> > -----Ursprüngliche Nachricht-----
> > Von: Rafael Schwarz ####@####.####
> > Gesendet: Dienstag, 21. Oktober 2008 16:01
> > An: ####@####.####
> > Betreff: [nanogui] FreeType2 and SetPortrait
> >
> >
> > Hi all,
> >
> > I'm using microwindows version 0.91 with nano-X and freetype2 fonts.
> > When I run my application with portrait none, it works
> > perfectly. When I try
> > to run it with the portrait left, nano-X draws everything
> > correctly, even
> > the images, but the texts don't appear. I tried to debug the
> > nano-X, but I
> > didn't find where the error happens.
> > Anyone knows something about it?
> >
> > Thanks in advance,
> >
> > Rafael C. Schwarz
> >
>
> 8-tung!
> Ab dem 1. Oktober 2008 ändern sich die Durchwahl- und Faxnummern Ihrer
> direkten Ansprechpartner bei MIWE in Arnstein. Vor jede dreistellige Nummer
> wird dann eine "8" eingefügt. Bitte ändern Sie unsere Kontaktdaten, damit
> wir auch in Zukunft immer für Sie erreichbar sind
>
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.