Exemplo n.º 1
0
        public static Pango.Layout CreateLayout(this Gtk.Widget widget, Context cairo_context)
        {
            Pango.Layout layout = cairo_context.CreateLayout();
            layout.FontDescription = widget.PangoContext.FontDescription.Copy();

            double resolution = -1;//widget.Screen.Resolution;

            if (resolution != -1)
            {
                Pango.Context context = layout.GetContext();
                context.SetResolution(resolution);
                context.Dispose();
            }

            return(layout);
        }