Ok but, if your goal is to produce a pdf file, you could still use GtkPrint. It also have the advantage of being available on the Windows port of gtk-sharp where PdfSurface is not (I don't known if this is still true, but it was a couple months ago).
To produce a PDF with GtkPrint, simply do something like : PrintOperation print = new PrintOperation(); print.BeginPrint += BeginPrint; print.DrawPage += DrawPage; print.ExportFilename = "/path_to_your_file.pdf"; print.Run(PrintOperationAction.Export, null); I have tried to directly use a PdfSurface but i change my mind when I was unable to run my applications on Windows. Your initial question was about font size problem. I think that using the Cairo.Context provided by GtkPrint is probably better because the context object is probably properly initialized (I'm guessing here...) and I have no font size problem with that. One more advantage of GtkPrint : You will be able send your drawing directly to a printer with very little modification if you have to. David Le mercredi 28 mai 2008 à 10:41 +0200, Elmar Haneke a écrit : > > I personally use something like this : > > > > [...] > > Pango.Layout layout = printContext.CreatePangoLayout(); > > > > layout.FontDescription = Pango.FontDescription.FromString("Times New > > Roman 10"); > > > I'm not using Gtk Printing. > > See sample attached. In the resulting PDF the fontsize is not correct. > > Elmar > _______________________________________________ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list