sfnt2woff-0.1.0.0: A command line tool to convert TrueType/OpenType fonts to WOFF format

Safe HaskellNone
LanguageHaskell2010

Graphics.WOFF

Contents

Synopsis

Encoding woff

encode :: ByteString -> Word16 -> Word16 -> IO EncodeResult Source #

Encode the OpenType/TrueType fonts into WOFF format

Setting metadata and private data

(argument order: woff, data)

setMetadata :: ByteString -> ByteString -> IO EncodeResult Source #

Add the given metadata block to the WOFF font, replacing any exisiting metadata block. The block will be zlib-compressed. Metadata is required to be valid XML (use of UTF-8 is recommended), though this function does not currently check this.

setPrivateData :: ByteString -> ByteString -> IO EncodeResult Source #

Add the given private data block to the WOFF font, replacing any exisiting private block. The block will NOT be zlib-compressed. Private data may be any arbitrary block of bytes; it may be externally compressed by the client if desired.