[Mono-list] FontSize on PdfSurface

David Cantin david_cantin at videotron.ca
Tue May 27 19:38:39 EDT 2008


Hi, 

I personally use something like this :

[...]
Pango.Layout layout = printContext.CreatePangoLayout();

layout.FontDescription = Pango.FontDescription.FromString("Times New
Roman 10");

layout.SetMarkup("Your text here");

printContext.CairoContext.MoveTo(xYLayout.x, xYLayout.y);
Pango.CairoHelper.ShowLayout(printContext.CairoContext, layout);

[...]

Or like this :

[...]
Pango.Layout layout = printContext.CreatePangoLayout();

layout.FontDescription = Pango.FontDescription.FromString("Times New
Roman");

layout.SetMarkup("<span size="\10240"\>Your text here</span>");

printContext.CairoContext.MoveTo(xYLayout.x, xYLayout.y);
Pango.CairoHelper.ShowLayout(printContext.CairoContext, layout);
[...]

Hope this help

David


Le mardi 27 mai 2008 à 15:22 +0200, Elmar Haneke a écrit :
> When Printing to an Cairo.PdfSurface (by using an Pango.Layout) the
> fontsize actually used seems to be about on third larger than the size
> specified.
> 
> How can I print with correct font size?
> 
> Elmar
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list