• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class CffFontWriter

Serialises a CffFont back to a binary sfnt/CFF stream.

For OTF/CFF fonts (loaded from an sfnt container with the "CFF " table) the sfnt frame is rebuilt from the raw table bytes stored at load time, with the original "CFF " bytes re-inserted.

Standalone raw CFF files are written back as-is without an sfnt wrapper.

Inheritance
object
CffFontWriter
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Drawing.Font.Cff
Assembly: DRIT.Drawing.dll
Syntax
public static class CffFontWriter

Methods

Write(CffFont, Stream)

Serialises font and writes the result to stream.

Declaration
public static void Write(CffFont font, Stream stream)
Parameters
Type Name Description
CffFont font
Stream stream
Exceptions
Type Condition
ArgumentNullException

Either argument is null.

NotSupportedException

Thrown for standalone (non-sfnt) CFF files where round-trip serialisation is not yet supported.

WriteToBytes(CffFont)

Serialises font and returns the resulting bytes.

Declaration
public static byte[] WriteToBytes(CffFont font)
Parameters
Type Name Description
CffFont font
Returns
Type Description
byte[]
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX