|
- 我在fonts/目录中有一种字体.如何将其加载到游戏中
- <style media='screen' type='text/css'> @font-face { font-family: font1; src: url('media/yourfont.ttf'); font-weight:400; font-weight:normal; }</style>
- 然后使用div加载字体:
- <div style="font-family:font1; position:absolute; left:-1000px; visibility:hidden;">.</div>
- 代码:
- 文字创建(0, 0, '流云思水', 'font1', null, null, null)
|
|