[Gtk-sharp-list] How can I scale text with Pango in only one (horizontal) direction?

l2rek lturek at live.com
Mon Apr 30 14:29:38 UTC 2012

I need to write some text with pango-sharp, but depending on the number of
characters scale the width.

This is what I currently have:

/var layout = new Pango.Layout (Core.PangoContext);
layout.FontDescription = Pango.FontDescription.FromString (
  "'Courier New' CLM  20");
layout.SetMarkup (@"12");
Area.GdkWindow.DrawLayout (Core.Area.Style.TextGC (
  StateType.Normal), 50, 50, layout);/

I was not able to find any hints on accomplishing that. I have found only a
XY Scale in Pango, but no Scale just on X or Y. I have also tried to use the
Pango Matrix in PangoContext but no luck : (

Thank you,
Best regards,

View this message in context: http://mono.1490590.n4.nabble.com/How-can-I-scale-text-with-Pango-in-only-one-horizontal-direction-tp4598358.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list