// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using SixLabors.Fonts.Tables.AdvancedTypographic;
using SixLabors.Fonts.Tables.AdvancedTypographic.Variations;
using SixLabors.Fonts.Tables.General;
using SixLabors.Fonts.Tables.General.Colr;
using SixLabors.Fonts.Tables.General.Kern;
using SixLabors.Fonts.Tables.General.Name;
using SixLabors.Fonts.Tables.General.Post;
using SixLabors.Fonts.Tables.General.Svg;
namespace SixLabors.Fonts.Tables.Cff {
///
/// Contains the collection of OpenType tables required for fonts with CFF or CFF2 outlines.
///
internal sealed class CompactFontTables : IFontTables
{
///
/// Initializes a new instance of the class with the required OpenType tables.
///
/// The character-to-glyph mapping table.
/// The font header table.
/// The horizontal header table.
/// The horizontal metrics table.
/// The maximum profile table.
/// The naming table.
/// The OS/2 and Windows metrics table.
/// The PostScript name mapping table.
/// The CFF or CFF2 outline table.
public CompactFontTables(
CMapTable cmap,
HeadTable head,
HorizontalHeadTable hhea,
HorizontalMetricsTable htmx,
MaximumProfileTable maxp,
NameTable name,
OS2Table os2,
PostTable post,
ICffTable cff)
{
this.Cmap = cmap;
this.Head = head;
this.Hhea = hhea;
this.Htmx = htmx;
this.Maxp = maxp;
this.Name = name;
this.Os2 = os2;
this.Post = post;
this.Cff = cff;
}
///
public CMapTable Cmap { get; set; }
///
public HeadTable Head { get; set; }
///
public HorizontalHeadTable Hhea { get; set; }
///
public HorizontalMetricsTable Htmx { get; set; }
///
public MaximumProfileTable Maxp { get; set; }
///
public NameTable Name { get; set; }
///
public OS2Table Os2 { get; set; }
///
public PostTable Post { get; set; }
///
public GlyphDefinitionTable? Gdef { get; set; }
///
public GSubTable? GSub { get; set; }
///
public GPosTable? GPos { get; set; }
///
public ColrTable? Colr { get; set; }
///
public CpalTable? Cpal { get; set; }
///
public KerningTable? Kern { get; set; }
///
public VerticalHeadTable? Vhea { get; set; }
///
public VerticalMetricsTable? Vmtx { get; set; }
///
/// Gets or sets the optional 'fvar' (Font Variations) table defining variation axes.
///
public FVarTable? FVar { get; set; }
///
/// Gets or sets the optional 'avar' (Axis Variations) table for non-linear axis mapping.
///
public AVarTable? AVar { get; set; }
///
/// Gets or sets the optional 'gvar' (Glyph Variations) table. Typically unused for CFF fonts.
///
public GVarTable? GVar { get; set; }
///
/// Gets or sets the optional 'HVAR' (Horizontal Metrics Variations) table.
///
public HVarTable? HVar { get; set; }
///
/// Gets or sets the optional 'VVAR' (Vertical Metrics Variations) table.
///
public VVarTable? VVar { get; set; }
///
/// Gets or sets the optional 'MVAR' (Metrics Variations) table for global metric deltas.
///
public MVarTable? MVar { get; set; }
///
/// Gets or sets the optional SVG table containing scalable vector glyph data.
///
public SvgTable? Svg { get; set; }
// Tables Related to CFF Outlines
// +------+----------------------------------+
// | Tag | Name |
// +======+==================================+
// | CFF | Compact Font Format 1.0 |
// +------+----------------------------------+
// | CFF2 | Compact Font Format 2.0 |
// +------+----------------------------------+
// | VORG | Vertical Origin (optional table) |
// +------+----------------------------------+
///
/// Gets or sets the CFF or CFF2 outline table.
///
public ICffTable Cff { get; set; }
}
}