File: fonts.py

package info (click to toggle)
bouncy 0.6.20071104-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,924 kB
  • ctags: 914
  • sloc: python: 4,672; makefile: 2; sh: 2
file content (13 lines) | stat: -rw-r--r-- 373 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import pyglyph

# load up fonts
fonts = pyglyph.font.LocalFontFactory('/usr/share/fonts/truetype/ttf-dejavu')
sans20 = fonts.get_font(family='DejaVu sans',
    size=20, bold=False, italic=False)

sans40 = fonts.get_font(family='DejaVu sans',
    size=40, bold=False, italic=False)

mono20 = fonts.get_font(family='DejaVu sans mono',
    size=20, bold=False, italic=False)