// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.IO;
namespace SixLabors.Fonts.Tables.AdvancedTypographic {
///
/// A LigatureGlyph table contains the number of carets and the offsets to their caret value tables
/// for a single ligature glyph.
///
///
internal sealed class LigatureGlyph
{
///
/// Gets or sets the array of offsets to caret value tables for this ligature glyph.
///
public ushort[]? CaretValueOffsets { get; internal set; }
///
/// Loads the from the binary reader at the specified offset.
///
/// The big endian binary reader.
/// Offset from the beginning of the LigGlyph table.
/// The .
public static LigatureGlyph Load(BigEndianBinaryReader reader, long offset)
{
reader.Seek(offset, SeekOrigin.Begin);
ushort caretCount = reader.ReadUInt16();
return new LigatureGlyph()
{
CaretValueOffsets = reader.ReadUInt16Array(caretCount)
};
}
}
}