Safe Haskell | None |
---|---|
Language | Haskell2010 |
- encode :: ByteString -> Word16 -> Word16 -> IO EncodeResult
- type EncodeResult = Either ErrorCode (ByteString, [Warning])
- data ErrorCode
- data Warning
- setMetadata :: ByteString -> ByteString -> IO EncodeResult
- setPrivateData :: ByteString -> ByteString -> IO EncodeResult
Encoding woff
encode :: ByteString -> Word16 -> Word16 -> IO EncodeResult Source #
Encode the OpenType/TrueType fonts into WOFF format
type EncodeResult = Either ErrorCode (ByteString, [Warning]) Source #
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.