I'm afraid that I know of no such tutorial, but for what you want to achieve I think that the link that I sent you should be sufficient. Basically you want to create a pango layout in whatever font and size, and then paste it in your cairo surface. Why isn't your small-hello.utf8 example enough for you? What are you missing? Postscript output? Create a cairo postscript surface instead of an image surface. OCR-B font? Depending on your encoding you may find it sufficient and easier to use the cairo text interface instead:


Feel free to ask if you have more questions.


On Sun, Sep 18, 2011 at 17:47, Matthias Apitz <guru@unixarea.de> wrote:
El día Friday, September 16, 2011 a las 10:13:52AM +0300, Dov Grobgeld escribió:

> Hi Matthias,
> Paps was indeed written some time ago, and since it was written the graphics
> library cairo has integrated with pango and had it been written today it
> would have been written that way. A rewrite of paps using cairo is really
> overdue.
> For your solution I certainly suggest using cairo + pango in whatever
> language these have bindings for. A solution similar to your problem can be
> seen in the following example on the vala tutorial page:
> http://live.gnome.org/Vala/PangoCairoSample
> That example outputs png files, but you can easily change it to outputting
> postscript.
> ....

Hi Dov,

First of all, thanks for your reply.

Do you have some pointer to a tutorial "Pango for C" for me?
I found the cairo documentation, its FAQ and samples which are quite
enough to start with. But for pango I only see the Pango Reference

Using the FAQ of cairo I am already able to write your text of the file
small-hello.utf8 to a png file, but this is certainly not enough, and
the Pange Reference does not give much explanations :-(

Thanks in advance

Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@unixarea.de> - w http://www.unixarea.de/