In R igraph, there is an easy way to set a custom typeface for vertex labels and other texts on graph plots:
plot(G,vertex.label.family="DINPro")
However as I see, vertex_label_family parameter is not available in python igraph. It took some time while I have found some workaround to be able to set the label font, so I will post my solution here. And I'm wondering, if there are more elegant or easier solutions. First I tried to call cairo's context.select_font_face() on the igraph plot object's context, but sadly the draw() function in igraph.drawing.graph.DefaultGraphDrawer() overwrites it in each plot.redraw():
lo = graph.layout_fruchterman_reingold()
sf = cairo.PDFSurface("test.pdf",1280,1280)
bx = igraph.drawing.utils.BoundingBox(10, 10, 1260, 1260)
plot = igraph.plot(graph,layout=lo,target=sf,bbox=bx)
plot._ctx.select_font_face("DINPro", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL)
plot.redraw()
plot.save()
So this doesn't work. I will post a simple solution what works.