arrowtype / fonttools-intro

An introduction to FontTools & font development
MIT License
84 stars 3 forks source link

Make trial font not working #3

Closed kosbarts closed 3 years ago

kosbarts commented 3 years ago

Hi Stephen,

I just tested the make trial font script on an otf as is, straight from the repo and it is not producing any changes except from the name tables.

Also, the suffix could be included in the font name instead of the default trial.

K.

arrowtype commented 3 years ago

Shoot, sorry about that, but thanks for letting me know! I'll try to take a look soon and see what the problem might be.

Can you explain what you mean about the suffix with an example, please? I'm not sure I understand.

kosbarts commented 3 years ago

I hope it is not some local issue on my mac.

Re Suffix: I see that you get the suffix from the parser: parser.add_argument('-s','--suffix', default="Trial", help='Suffix to add to trial font names. Default: "Trial".')

but here you just save the file with a .trial suffixed without actually making use of the argument that the user gives. That would be better imho.

-------------------------------------------------------------------------------------------------

    # save font with ".trial" added to name
    ttfont.save(tempSubsetPath.replace(f".subset.{filetype}",f".trial.{filetype}"))
    # clean up temp subset font
    os.remove(tempSubsetPath)
arrowtype commented 3 years ago

Okay, I tried it on an OTF of my own, and found that there were indeed several issues with it.

Please give it another try with the latest version, and let me know how it goes.

If it gives any kind of error, go ahead and copy that here, please.

kosbarts commented 3 years ago

Nice. It works fine now.