gtk
Listing GTK accessible fonts
كتبه خالد يوم 26 مارس 2008I was trying to figure how to list fonts accessible to GTK (or pango actually), it turned out that pango.Context has a list_families() method that returns a tuple of pango.FontFamily objects.
Some thing like this:
window = gtk.Window()
context = window.get_pango_context()
families = context.list_families()
for i in families:
print i.get_name()
- علِّق
- قرأت 3998 مرة