Advertisement
smathot

Different fonts on same canvas

Dec 29th, 2012
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. from openexp.canvas import canvas
  2.  
  3. text1 = 'default'
  4. text2 = 'mono'
  5. text3 = 'serif'
  6.  
  7. myCanvas = canvas(exp)
  8. myCanvas.text(text1, y=100)
  9. myCanvas.set_font(style='mono')
  10. myCanvas.text(text2, y=200)
  11. myCanvas.set_font(style='serif')
  12. myCanvas.text(text3, y=300)
  13. myCanvas.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement