New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
font2img.py error #13
Comments
It seems you didn't provide the right path to your source font through src_font argument. You need to offer a valid ttf/otf font file to point to in order to run the script. |
@kaonashi-tyc thank you.where can i get the ttf/otf font file with the tutorial guide |
@Shuolongbj you can just google/baidu font ttf download |
@Shuolongbj did you solve this problem? |
@Shuolongbj @kaonashi-tyc what is the specific process? |
你去百度搜索下载ttf或者otf格式的文件,下载好之后放在font2img.py 同一级。 |
如何生成自己想要的字符而不是随机采样 |
:~/zi2zi$ python font2img.py --src_font=src.ttf \
Traceback (most recent call last):
File "font2img.py", line 120, in
args.sample_count, args.sample_dir, args.label, args.filter)
File "font2img.py", line 72, in font2img
src_font = ImageFont.truetype(src, size=char_size)
File "/Users/Ru/anaconda/envs/gan/lib/python2.7/site-packages/PIL/ImageFont.py", line 238, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/Users/Ru/anaconda/envs/gan/lib/python2.7/site-packages/PIL/ImageFont.py", line 127, in init
self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource
@kaonashi-tyc thank you!
The text was updated successfully, but these errors were encountered: