string markup = "Hello World!"; var pangoLayout = new PangoLayout(context); pangoLayout.SetMarkup(markup); // Renders "Hello World!" in bold font
string markup = "Red text";
var pangoLayout = new PangoLayout(context);
pangoLayout.SetMarkup(markup);
// Renders "Red text" in red color
In this example, the SetMarkup method is used to set the foreground color of the text to red. The resulting layout is then used to render the text.
Overall, Pango is a powerful text rendering engine that allows developers to format and render text in a rich and flexible way.