WangA commited on
Commit
d7a6584
1 Parent(s): 0da05b1

Update prepare_data.py

Browse files
Files changed (1) hide show
  1. prepare_data.py +1 -1
prepare_data.py CHANGED
@@ -50,7 +50,7 @@ def char2image(chars_list):
50
  if os.path.exists(char_path):
51
  continue
52
  # 文件夹里还有别的类型的字体
53
- font = pygame.font.Font(r"C://Windows/Fonts/simhei.ttf", 100)
54
  # 第三个参数为字体颜色,第四个参数为背景颜色。
55
  rtext = font.render(char, True, (0, 0, 0), (255, 255, 255))
56
  pygame.image.save(rtext, char_path)
 
50
  if os.path.exists(char_path):
51
  continue
52
  # 文件夹里还有别的类型的字体
53
+ font = pygame.font.Font(r"./simhei.ttf", 100)
54
  # 第三个参数为字体颜色,第四个参数为背景颜色。
55
  rtext = font.render(char, True, (0, 0, 0), (255, 255, 255))
56
  pygame.image.save(rtext, char_path)