public int ListFamilies(Pango.FontFamily families) { int n_families; pango_font_map_list_families(Handle, families.Handle, out n_families); return(n_families); }
private void RenderCellFamilyName(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { Pango.FontFamily family = model.GetValue(iter, 1) as Pango.FontFamily; (cell as Gtk.CellRendererText).Text = family.Name; Pango.FontDescription desc = new Pango.FontDescription(); desc.Family = family.Name; desc.Size = (int)(FontTool.FontService.FONT_DEFAULT_SIZE * Pango.Scale.PangoScale); (cell as Gtk.CellRendererText).FontDesc = desc; }
public static Pango.FontFace FindFontFace(Pango.FontDescription desc, Pango.FontFamily family = null) { if (family == null) { family = FontFamilyHandler.FindCorrectedFamily(desc.Family); } var weight = desc.Weight; var style = desc.Style; var stretch = desc.Stretch; foreach (var face in family.Faces) { var faceDesc = face.Describe(); if (faceDesc.Weight == weight && faceDesc.Style == style && faceDesc.Stretch == stretch) { return(face); } } return(null); }
bool InvokeNative(Pango.FontFamily family, Pango.FontFace face) { bool __result = native_cb(family == null ? IntPtr.Zero : family.Handle, face == null ? IntPtr.Zero : face.Handle, __data); return(__result); }