public void SetItalic(bool italic) { if (italic) { this.style = Pango.Style.Italic; } else { this.style = Pango.Style.Normal; } }
public static bool ParseStyle(string str, out Pango.Style style, bool warn) { IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup(str); int native_style; bool raw_ret = pango_parse_style(native_str, out native_style, warn); bool ret = raw_ret; GLib.Marshaller.Free(native_str); style = (Pango.Style)native_style; return(ret); }
// Pango Style sounds like some sort of dance private static FontStyle FromPangoStyle(Pango.Style pangoStyle, Pango.Weight pangoWeight) { FontStyle result = FontStyle.Regular; if (pangoWeight == Pango.Weight.Bold) { result |= FontStyle.Bold; } if (pangoStyle == Pango.Style.Italic) { result |= FontStyle.Italic; } return(FontStyle.Regular); }
public AttrStyle(Pango.Style style) : this(pango_attr_style_new(style)) { }
static extern IntPtr pango_attr_style_new(Pango.Style style);
public void AddStyleAttribute(Pango.Style style, uint start, uint end) { Add(pango_attr_style_new(style), start, end); }
public Pango.Style GetStyle(Pango.Style defaultStyle) { return(Italic ? Pango.Style.Italic : Pango.Style.Normal); }
public void SetItalic(bool italic) { if (italic) this.style = Pango.Style.Italic; else this.style = Pango.Style.Normal; }