Skip to content

Commit 948a566

Browse files
author
Lionel
committed
adding the font module, mainly reading doc
1 parent 8096b2e commit 948a566

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

font.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import cocos
2+
3+
4+
class Font(object):
5+
def __init__(self, name, size):
6+
self.name = name
7+
self.size = size
8+
9+
def Label(self, text, **kw):
10+
label = cocos.text.Label(text, font_name=self.name, font_size=self.size, **kw)
11+
return label
12+
13+
TNR_32 = Font('Times New Roman', 32)

0 commit comments

Comments
 (0)