【pygame】pythonでゲーム製作【ぱいがめ】at GAMEDEV【pygame】pythonでゲーム製作【ぱいがめ】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト331:323 08/06/03 11:39:19 mLDxfbhh.net とりあえずこんな感じです #!/usr/bin/env python # -*- coding:utf-8 -*- import StringIO import pygame from pygame.locals import * def main(): pygame.init() # pygameの初期化 screen = pygame.display.set_mode( (180, 180) ) # 画面を作る pygame.display.set_caption('Hello pygame') # タイトル fp = open(u'みかP.ttf', 'rb') font = pygame.font.Font(fp, 24) # フォントを読み込む text = font.render(u"日本語表示テスト", True, (255,255,255)) fp.close() #ここの部分がエラー 下記はエラーメッセージ #This application has requested the Runtime to terminate it in an unusual way. #Please contact the application's support team for more information. # fp2 = open(u'みかP.ttf', 'rb') buf = StringIO.StringIO(fp2.read()) buf.seek(0,0) font2 = pygame.font.Font(buf, 24) # フォントを読み込む text2 = font2.render(u"日本語StringIO", True, (255,255,255)) buf.close() fp2.close() 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch