CJK Font OTF Size

Hello,

When I export the font I am working, which contains more than 20k characters, the final file size is around 14 MB.

I know it is because I disabled subroutines (because of all the complex outlines of CJK), but is there a way to reduce this size anyway? Thanks a lot

Edit: I have disabled auto-hinting for the asian characters

You can try to post process the CFF table with the tx tool from Adobe. It might be able to do the subroutinisation.
It is much quicker than makeOTF.

tx -cff -S -b font.otf font.cff
sfntedit -a CFF=font.cff font.otf
sfntedit -f font.otf

Or you enable it in Glyphs and let makeOTF do the subroutinisation. You might need to wait a few hours or days.

You can get the tx tool here: https://github.com/adobe-type-tools/afdko

Hey Georg, thanks for your precious answer. I did install AFDKO from Adobe on the terminal, that was pretty easy.

However I really bad with terminal interactions (python?). do you know how I could reach one font called ‘xx.otf’ on my user desktop? I couldn’t find anything with Google… :frowning:

Thanks a lot!

Here’s what I got (obviously because there is no path…)

Oh wait, I noticed it is in fact simple, just drag and drop.It is ok for the OTF file.
But what about this ‘font.cff’? How can I get it (I might sound dumb right now haha sorry)

The line you pasted assumes that the font is called font.otf

Edit 2 :slight_smile:

I managed to play with the code. However nothing has changed on the file size :frowning: .

Here’s what I did and got:

(afdko_env) valentinpapon@valentins-imac ~ % tx -cff -S -b /Library/Application\ Support/Adobe/Fonts/font-test.otf /Library/Application\ Support/Adobe/Fonts/font-test.cff

tx: --- /Library/Application Support/Adobe/Fonts/font-test.otf

tx: (cfw) unhinted <.notdef>

tx: (cfw) unhinted <exclam>

tx: (cfw) unhinted <quotedbl>

tx: (cfw) unhinted <numbersign>

tx: (cfw) unhinted <dollar>

tx: (cfw) There are 58115 additional reports of 'unhinted'.

(afdko_env) valentinpapon@valentins-imac ~ % sfntedit -a CFF=/Library/Application\ Support/Adobe/Fonts/font-test.cff /Library/Application\ Support/Adobe/Fonts/font-test.otf

(afdko_env) valentinpapon@valentins-imac ~ % sfntedit -f /Library/Application\ Support/Adobe/Fonts/font-test.otf

Hey mekkablue,

Yeah I know, I actually didn’t know how to reach my font…… ahah now it’s done, see my last Edit :slight_smile:

1 Like

Sorry, I copied the wrong command. It has to be +S, not -S.

1 Like

Hey, thanks, it worked! Just saved me 2 MO but that is not negligible!

When you are looking to use that font as a webfont, you might try to compress it as woff with or without subroutinisation. It might be that the woff compression can compress either one better.

Great I’ll do that! Thanks