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

the requirement of the font #4

Closed
simbadu1999 opened this issue Jan 25, 2022 · 10 comments
Closed

the requirement of the font #4

simbadu1999 opened this issue Jan 25, 2022 · 10 comments

Comments

@simbadu1999
Copy link

Is it necessary that the font I use must be a true type or an open type one? There is an error when I input a font made by other organizations into the get_chars_from_ttfs.py.

@simbadu1999
Copy link
Author

ps: the font I use is "xxxx.TTF" and there is a mistake, too. Is that illegal? THANKS!

@8uos
Copy link
Collaborator

8uos commented Jan 25, 2022

Our code only treats '.ttf' files (ttf should be lower cases!).
If you still have problems after changing "TTF" to "ttf", please show the error message to me.
Thanks!

@simbadu1999
Copy link
Author

Our code only treats '.ttf' files (ttf should be lower cases!). If you still have problems after changing "TTF" to "ttf", please show the error message to me. Thanks!

1643100084(1)

@simbadu1999
Copy link
Author

Our code only treats '.ttf' files (ttf should be lower cases!). If you still have problems after changing "TTF" to "ttf", please show the error message to me. Thanks!

I found that my own ttf.sfontversion is #$ as shown in pic1, while your given ttf is [] as shown in pic2.
1643100607(1)
1643100818(1)

@simbadu1999
Copy link
Author

To correct the description above, the given ttf's sfontversion is "\x00\x01\x00\x00" ,which equals to" � ". Thus, the code judges the sentence is false and didn't raise the error, while my ttf's sfontversion is not in ("\x00\x01\x00\x00", "OTTO", "true"). So, may I delete the judgement sentence? THANKS!

@8uos
Copy link
Collaborator

8uos commented Jan 25, 2022

Our code only treats '.ttf' files (ttf should be lower cases!). If you still have problems after changing "TTF" to "ttf", please show the error message to me. Thanks!

I found that my own ttf.sfontversion is #$ as shown in pic1, while your given ttf is [] as shown in pic2. 1643100607(1) 1643100818(1)

  1. Actually, I don't know well about the .ttf files, but the code I uploaded worked well for my font files.
    If you can define the available character list from the ttf file with your own method, it is okay to use that method.
    Please see here for the example.

  2. I checked the mean of the rendered picture to filter blank images because there were some characters with blank images in my font files.

@simbadu1999
Copy link
Author

Our code only treats '.ttf' files (ttf should be lower cases!). If you still have problems after changing "TTF" to "ttf", please show the error message to me. Thanks!

I found that my own ttf.sfontversion is #$ as shown in pic1, while your given ttf is [] as shown in pic2. 1643100607(1) 1643100818(1)

  1. Actually, I don't know well about the .ttf files, but the code I uploaded worked well for my font files.
    If you can define the available character list from the ttf file with your own method, it is okay to use that method.
    Please see here for the example.
  2. I checked the mean of the rendered picture to filter blank images because there were some characters with blank images in my font files.

got it, thanks!

@SanghyukChun
Copy link
Collaborator

Closing the issue, assuming the answer resolves the problem.
Please re-open the issue as necessary.

@simbadu1999
Copy link
Author

simbadu1999 commented May 7, 2022 via email

1 similar comment
@simbadu1999
Copy link
Author

simbadu1999 commented Oct 11, 2022 via email

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

3 participants