Commit Graph

10 Commits

Author SHA1 Message Date
Laurenz 20b4d590b3 Fix wrong `search_range` computation 2022-04-05 17:03:24 +02:00
Laurenz 9730e785a8 Tidy up 2022-02-07 14:19:13 +01:00
Laurenz f5dcb84e36 Make clippy a bit happier 2021-12-30 12:00:12 +01:00
Laurenz 63c274e7f6 Make clippy happier and remove `Str` 2021-11-15 17:06:43 +01:00
Laurenz 411aba5b6f Subset CFF subrs referenced by FD array 2021-08-29 14:46:51 +02:00
Laurenz d101612414 Primitive CFF1 subsetting
The subsetting strategy is somewhat crazy for now: Simply zero the glyph data for all unused glyphs. While the CFF table itself doesn't shrink, the actual embedded font is compressed and greatly benefits from the repeated zeros.

This already compresses the fonts a lot (~90% for NotoSerifCJK), but they are still quite large.

Therefore, the plan of action:
- First, find more data that can be zeroed out.
- Then _maybe_ see whether we can instead properly rebuild the subsetted font.
2021-08-28 23:53:46 +02:00
Laurenz 73b63ffb99 Refactor subsetter
- Gracefully handle failed subsetting of one table
- Remove need for creating a ttf-parser face
2021-08-27 14:11:49 +02:00
Laurenz dff2175558 Subset post table 2021-08-27 14:08:32 +02:00
Laurenz 821536b253 Subset glyf and loca tables 2021-08-25 12:12:47 +02:00
Laurenz 6f84cf3c22 Basic subsetting architecture
Constructs a brand new font file where only necessary tables are contained.
2021-08-24 23:43:51 +02:00