go-text / typesetting

High quality text shaping in pure Go.
Other
88 stars 11 forks source link

Opentype font writer #102

Closed benoitkugler closed 8 months ago

benoitkugler commented 8 months ago

This PR adds support to write an Opentype font file from a list of tables.

This is a simple implementation, since neither font collections nor compressed format (WOFF) are supported.

This paves the way for features such as subsetter or variable font instantiater.

Conceptually, the Write function performs the reverse operation of NewLoader, so that I think it should belong to this package.

Note that the GUI toolkits are probably NOT interested by such features, but since the Go linker is able to remove dead code, it should come with no cost for end users anyway.