| 1 |
""" |
| 2 |
Test pyglet font package |
| 3 |
""" |
| 4 |
|
| 5 |
import pyglet |
| 6 |
|
| 7 |
|
| 8 |
def test_load_privatefont(test_data): |
| 9 |
file = test_data.get_file('fonts', 'action_man.ttf') |
| 10 |
pyglet.font.add_file(file) |
| 11 |
myfont = pyglet.font.load("Action Man", size=12, dpi=96) |
| 12 |
assert myfont.name == "Action Man" |
| 13 |
|
| 14 |
|
| 15 |
def test_load_privatefont_from_list(test_data): |
| 16 |
file = test_data.get_file('fonts', 'action_man.ttf') |
| 17 |
pyglet.font.add_file(file) |
| 18 |
|
| 19 |
myfont = pyglet.font.load(["Action Man", "Arial"], size=12, dpi=96) |
| 20 |
assert myfont.name == "Action Man" |