Re: [GtkGLExt] (no subject)
- From: Matt Kern <matt kern cyantechnology com>
- To: Mukund Sivaraman <muks banu com>
- Cc: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] (no subject)
- Date: Tue, 06 Apr 2010 15:03:10 +0100
The font-pangoft2 demo does work on my other Ubuntu/Karmic install, so I
guess there must be an old and broken library on my Debian machine.
Matt
On Tue, 2010-04-06 at 14:13 +0100, Matt Kern wrote:
> Thank you for the pointer.
>
> Interestingly font-pangoft2 displays only a red sphere on my machine.
> The "This text is rendered with ..." message does not appear. This was
> with the Debian/Lenny libpango1.0-0 version 1.20.5-5. The
> font-pangoft2-tex example does work (assuming it is a StarWars tribute).
>
> Matt
>
>
> On Tue, 2010-04-06 at 17:28 +0530, Mukund Sivaraman wrote:
> > Hi Matt
> >
> > On Tue, Apr 06, 2010 at 12:48:59PM +0100, Matt Kern wrote:
> > > Is it possible to rander antialiased text inside a glarea? If so, how?
> > >
> > > I have a PyGtk + GtkGLext program which currently uses pango fonts:
> > >
> > >
> > > glEnable(GL_POINT_SMOOTH)
> > > glEnable(GL_LINE_SMOOTH)
> > > glEnable(GL_POLYGON_SMOOTH)
> > > glEnable(GL_BLEND)
> > > glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
> > > glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE)
> > > ...
> > > self.__font_string = 'courier bold 14'
> > > self.__font_list_base = glGenLists(128)
> > > self.__font_desc = pango.FontDescription(self.__font_string)
> > > self.__font = gtk.gdkgl.font_use_pango_font(self.__font_desc, 0, 128, self.__font_list_base)
> > > ...
> > > glRasterPos2f(-10.0, 6.0)
> > > glListBase(self.__font_list_base)
> > > glCallLists(node.label)
> > >
> >
> > Look at the font-pangoft2* examples in the examples directory of the
> > gtkglext source code distribution. You should be adapt it to your
> > Python code. This approach obviously doesn't use the bitmap display
> > lists as in your code above.
> >
> > Mukund
--
Matt Kern
Cyan
This e-mail message is confidential and for use by the addressee only.
If you are not the intended recipient, please contact us, delete the
message from your computer and destroy any copies. Accordingly any
dissemination, distribution, copying or other use of this message or any
of its content by any person other than the intended recipient is
strictly prohibited.
Internet e-mails are not necessarily secure, therefore responsibility is
not accepted for changes made to this message after it was sent. Any
views or opinions expressed are solely those of the author and do not
necessarily represent those of Cyan Holdings plc or any associated or
subsidiary companies.
This email has been scanned for viruses. It is the responsibility of
the recipient to ensure that the onward transmission, opening or use of
this message and any attachments will not adversely affect its systems
or data.
Cyan Holdings plc, Buckingway Business Park, Swavesey, Cambridge CB24 4UQ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]