Skip to content
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

Error in extract_codepoints.py #6

Open
aoshimak opened this issue Jul 3, 2015 · 5 comments
Open

Error in extract_codepoints.py #6

aoshimak opened this issue Jul 3, 2015 · 5 comments

Comments

@aoshimak
Copy link

aoshimak commented Jul 3, 2015

After I transfer some 2byte font to pfo resource, I sometimes saw this error: IndexError: image index out of range.
And I sometimes need only codepoint list.
I am appreciate if you could add a option only to output json list.
Thanks in advance.

Somple of error message are below.

python extract_codepoints.py terab28.pfo
Contains 364 codepoints
Maximum height: 28
Traceback (most recent call last):
File "..\langpack\extract_codepoints.py", line 94, in
extract_codepoints(font)
File "..\langpack\extract_codepoints.py", line 75, in extract_codepoints
bitmap.putpixel((count/side_gap+x+left, count%side_gap+y+top), (0,0,0))
File "E:\Python27\lib\site-packages\PIL\Image.py", line 1526, in putpixel
return self.im.putpixel(xy, value)
IndexError: image index out of range

@xndcn
Copy link
Owner

xndcn commented Jul 7, 2015

@aoshimak Sorry for that, I will add an option soon...
Could you give me a copy of the font terab28.pfo? I want to find out what happened, thank you!

@aoshimak
Copy link
Author

aoshimak commented Jul 7, 2015

I put terab28.pfo on this link. Please download it.
http://yahoo.jp/box/p3abvy

@xndcn
Copy link
Owner

xndcn commented Jul 8, 2015

@aoshimak Thank you, I have update a new version, please check it again.
I will add an option to disable image show later.

@aoshimak
Copy link
Author

aoshimak commented Jul 9, 2015

I checked updated version with the same file "terab28.pfo". That's works fine. Thanks.
But it seems similar error with another font object.
I put the font object on the link below.
http://yahoo.jp/box/VkBjXM

python extract_codepoints.py mp1cl28.pfo
Contains 8205 codepoints
Maximum height: 28
Traceback (most recent call last):
File "extract_codepoints.py", line 95, in
extract_codepoints(font)
File "extract_codepoints.py", line 76, in extract_codepoints
bitmap.putpixel((count/side_gap+x+left, count%side_gap+y+top), (0,0,0))
File "E:\Python27\lib\site-packages\PIL\Image.py", line 1526, in putpixel
return self.im.putpixel(xy, value)
IndexError: image index out of range

@xndcn
Copy link
Owner

xndcn commented Jul 10, 2015

@aoshimak Sorry for that... This time is a different bug... Some character glyph is out of its box.
Anyway, now fixed, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants