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

Class TtfFontReader

Reads a TrueType or OpenType/TT font from a stream and returns a fully parsed TtfFont.

Inheritance
object
TtfFontReader
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.Ttf
Assembly: DRIT.Drawing.dll
Syntax
public static class TtfFontReader
Remarks

The stream is read sequentially from its current position; it must be seekable because individual table bytes are read by absolute offset. The stream is not disposed by this reader.

Methods

Read(Stream)

Parses the sfnt data from stream and returns a TtfFont.

Declaration
public static TtfFont Read(Stream stream)
Parameters
Type Name Description
Stream stream
Returns
Type Description
TtfFont
Remarks

The stream is read sequentially from its current position; it must be seekable because individual table bytes are read by absolute offset. The stream is not disposed by this reader.

Exceptions
Type Condition
ArgumentNullException

stream is null.

InvalidOperationException

The stream does not start with a recognised sfnt magic value, or a required table is missing.

Back to top

DR-IT Software documentation

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

Generated by DocFX