Here is how to select the font in cairo in python.

import cairocffi as cairo

# define context somewhere..

ft="Times New Roman"
context.select_font_face(ft, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL)
Categories: python

0 Comments

Leave a Reply

Your email address will not be published.