indestructible-type / Jost

Jost* by indestructible type*
https://indestructibletype.com/Jost.html
Other
665 stars 26 forks source link

Jost[wght].ttf is unexpectedly large #72

Closed davelab6 closed 3 years ago

davelab6 commented 3 years ago

@bghryct and @EwonRael, the GF engineering team did an analysis of the file size per-axis across the current GF library, and Jost has stuck out as a major outlier. The 2 ends of the table look like this:

Family Name Axis Full axis size (woff2) Avg Single instance size (woff2) Size factor
Dancing Script wght 55,788 32,170 1.7
Encode Sans wght 40,904 23,544 1.7
Playfair Display wght 69,508 39,497 1.8
Roboto Mono wght 97,380 36,165 2.7
...
Spartan wght 42,892 15,505 2.8
Hepta Slab wght 116,364 35,654 3.3
Jost wght 124,072 17,944 6.9

A quick look at the current jost.designspace shows that indeed there are 7 masters, 100 .. 900, thus the 7x filesize increase.

This is surprising to me, as the primary value of a Weight axis, at least to Google, is the reduction in file size that it offers compared to static set of styles.

I wonder if simply removing all but the 100, 400, 900, will produce an equivalent result, or if that plus an avar table can do it.

cc @m4rc1e

EwonRael commented 3 years ago

Yes I agree. I was having trouble making a build script that made static interpolations but obviously I've got this sorted with the bodoni as that has only 4 masters per vf file and build script runs fine. I'll update Jost soon

bghryct commented 3 years ago

Thanks @davelab6. I've contacted @EwonRael about this. We'll get moving on it. This is strange to me as well, as the designspace I recall building had three masters.

davelab6 commented 3 years ago

I recommended to subset out the instances from the vf ttf with fonttools varLib instancer as a post-production step

EwonRael commented 3 years ago

Okay just did some revisions on the back end of Jost* it should address this issue. Google branch is live

https://github.com/indestructible-type/Jost/tree/google