From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Pango in GtkAda Gtk version 3 Date: Fri, 31 Jan 2014 11:24:58 +0100 Organization: cbb software GmbH Message-ID: <1dxm5lvmvxnxq.1i8lg92ra622o$.dlg@40tude.net> References: <52eb6ce2$0$21832$703f8584@news.kpn.nl> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: I5Na6+WsEzT8WoegI0VZTA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 1774 Xref: number.nntp.dca.giganews.com comp.lang.ada:184623 Date: 2014-01-31T11:24:58+01:00 List-Id: 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