comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Pango in GtkAda Gtk version 3
Date: Fri, 31 Jan 2014 11:24:58 +0100
Date: 2014-01-31T11:24:58+01:00	[thread overview]
Message-ID: <1dxm5lvmvxnxq.1i8lg92ra622o$.dlg@40tude.net> (raw)
In-Reply-To: 52eb6ce2$0$21832$703f8584@news.kpn.nl

On Fri, 31 Jan 2014 10:27:19 +0100, ldries46 wrote:

> Is their an equivalent of the "Hello World" program for using 'Pango' within 
> a drawing area.
> If so where can I find it?

Nowhere. GTK+ 3.x does not have drawing area anymore.

> I need it to learn using Pango within a program

To use a Pango font with Cairo, you should:

1. create a Pango_Layout on the given context (Create_Layout);
2. set Pango font there (Set_Font_Description);
3. set text to render into the layout (Set_Text);
4. draw the layout (Show_Layout_Line).

For further information see:

https://developer.gnome.org/pango/unstable/pango-Cairo-Rendering.html

Examples of use with GtkAda are here (require some adjustments for GTK
3.x).

http://www.dmitry-kazakov.de/ada/aicwl.htm

Since Pango fonts and Toy fonts are considerably different in their use,
the library has an abstraction layer in order to be able to use both.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-01-31 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  9:27 Pango in GtkAda Gtk version 3 ldries46
2014-01-31 10:24 ` Dmitry A. Kazakov [this message]
2014-01-31 14:09   ` ldries46
2014-01-31 18:40     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox