Page 1 of 1

[CLOSED] Making swash character making file size much bigger

Posted: Sun Dec 10, 2023 4:52 pm
by LisanAlGaib
I have created six swash character and I have created an otf file with my swash characters. I suddenly realized my file size have grown from 135 kb to 421 kb. I tested my file I have created one swash set but in my there is two swash set option.

Re: Making swash character making file size much bigger

Posted: Sun Dec 10, 2023 10:13 pm
by Bhikkhu Pesala
It is unlikely to be a bug, and a file size of 421 kb is not too big. Many of my fonts are over 1 Mb for a single typeface.

Re: Making swash character making file size much bigger

Posted: Mon Dec 11, 2023 7:20 am
by LisanAlGaib
Yes, but it is caused by six characters difference that more than doubled the file size.

Re: Making swash character making file size much bigger

Posted: Mon Dec 11, 2023 10:28 am
by Bhikkhu Pesala
Try Optimising the contours. Probably, there are way more points than are needed. Look at the hintline to see just how many there are in each swash glyph. If they are imported from images, there may be a lot.

Re: Making swash character making file size much bigger

Posted: Mon Dec 11, 2023 11:25 am
by LisanAlGaib
They are not imported from images.

Re: Making swash character making file size much bigger

Posted: Sun Dec 17, 2023 8:13 pm
by LisanAlGaib
This is still an opened issue.

Re: Making swash character making file size much bigger

Posted: Sun Dec 17, 2023 9:16 pm
by Erwin Denissen
Do send the font project so we can look into this problem.

Re: Making swash character making file size much bigger

Posted: Mon Dec 18, 2023 9:55 am
by Erwin Denissen
Thank you for sending the font project. I suspect the file is blown up due to the large kerning lookup.

If you leave it out, the file size becomes less than 100 KB.

Re: Making swash character making file size much bigger

Posted: Mon Dec 18, 2023 3:39 pm
by LisanAlGaib
I have an OTF file that contains 1182 glyhps and their kernings and this file size is 135 kb.
I am adding 6 more glyhps to this file and their kernings.
The new OTF file contains 1188 glyphs and their and this file is 421 kb.
Adding 6 more characters and their kernings more than doubled the new file size.
I know if I add new characters to my project file size will be bigger but just 6 glyhps and kernings shouldn't have to double.
It could be optimizing problem, perhaps?

Re: Making swash character making file size much bigger

Posted: Mon Dec 18, 2023 4:08 pm
by LisanAlGaib
I used Automatic kerning.

File without swash characters:
Kerning pair
17621/123922
File with swash characters:
Kerning pair
123922/123922

Re: Making swash character making file size much bigger

Posted: Mon Dec 18, 2023 4:13 pm
by LisanAlGaib
In my project file
Kerning pair
17711/123922

But in my OTF file
Kerning pair
123922/123922

It is weird.